0
点赞
收藏
分享

微信扫一扫

PHP-7: 通过网址获得参数

萨科潘 2022-02-27 阅读 35

php文件

假设在网站根目录下有文件index.php

<?php
$UID = $_GET['UID'];
echo 'UID is: '.$UID;
?>

浏览器测试

可以输入: 网址/index.php?UID=3
假如网站为www.baidu.com
则为www.baidu.com/index.php?UID=3

举报

相关推荐

0 条评论