PHP我不懂。你用引号把它引起来还是不行吗?

解决方案 »

  1.   

    _SERVER["SCRIPT_URL"]+"?"+$_SERVER["QUERY_STRING"]
    前面是URL,?后面则是&的部分!
      

  2.   

    能不能说详细点?我需要的是能够取得 url 的值为 http://localhost/test1.php?id=1&sorts=2如果这样直接取的话,只能取道 http://localhost/test1.php?id=1
      

  3.   


    使用URL编码
    urldecode()编码
    urlencode()解码
      

  4.   

    纠正上面:
    urldecode()解码
    urlencode()编码或者用base编码
    base64_decode()
    base64_encode()比如:
    $url=http://localhost/test1.php?id=1&sorts=2
    $url = base64_encode($url);<a href='test.php?url=<?=$url?>'>test</a>test.php$url = base64_decode($url);
    echo $url;
      

  5.   

    $_SERVER["QUERY_STRING"]可以取得问号以后所有的字串
      

  6.   

    很简单
    test.php?url=http://localhost/test1.php?id=1%26sorts=2
    即可
      

  7.   

    问题解决,感谢 sandyuk(冰の沙隆):)