$_get 也可以收集 url 中的发送的数据。
假设我们有一张页面含有带参数的超链接:
<html> <body> <a href="test_get.php?subject=php&web=w3school.com.cn">测试 $get</a> </body> </html> 当用户点击链接 "test $get",参数 "subject" 和 "web" 被发送到 "test_get.php",然后您就能够通过 $_get 在 "test_get.php" 中访问这些值了。 下面的例子是 "test_get.php" 中的代码: 实例 <html> <body> <?php echo "study " . $_get['subject'] . " at " . $_get['web']; ?> </body> </html>
