如何在php中获取页面的querystring?

时间:2019-05-14 14:58:39

标签: php

我目前有一个链接,我想在其中提取链接并仅获取查询字符串。

有没有比使用爆炸获取内容更好的方法了?

$test = explode("?",$user['Url']);
// Get the querystring contents
echo $test[1];

我尝试使用$_SERVER['QUERY_STRING'],但是当它出现错误时,我不知道它是否已弃用

0 个答案:

没有答案