如何获得问号后的网址。例子
http://www.website.com/download.php?http://website.com/file_name/
并将其打印在我的网站上。
例如:
您正在下载: http://website.com/file_name/
请告诉我确切的操作方法,因为我对这种东西还很陌生。
用这个
<?php
$url = $_SERVER['REQUEST_URI']; //to get the current url
if (($tmp = strstr($url, '?')) !== false) //check if '?' is present
{
$str = substr($tmp, 1); //to sub-string after '?'
echo $str;
}
?>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句