我安裝了PHP 5.1.6(cli),並且每當GET查詢字符串超過128個字符時,將以HTTP 406 Not Acceptable錯誤失敗。任何建議如何解決這個問題可以使用超過128個字符? POST不是一個選項。PHP查詢字符串限制
錯誤是由服務器返回,所以不要認爲它是瀏覽器問題。 而我認爲它是PHP而不是Apache的原因是因爲它可以很好地處理HTML文件。
GET /test.php?phptestof129characterstring-NEW-WOVEN-FENCE-PANELS-GARDEN_W0QQitemZ200303392512QQihZ010QQcategoryZ139954QQtcZphotoQQcmdZViewItem HTTP/1.1 Host: ***** User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: agent_name=Tim HTTP/1.1 406 Not Acceptable Date: Tue, 03 Feb 2009 12:05:33 GMT Server: Apache/2.2.3 (Red Hat) X-Powered-By: PHP/5.1.6 Content-Length: 0 Connection: close Content-Type: text/html
GET /test.html?phptestof129characterstring-NEW-WOVEN-FENCE-PANELS-GARDEN_W0QQitemZ200303392512QQihZ010QQcategoryZ139954QQtcZphotoQQcmdZViewItem HTTP/1.1 Host: ***** User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: agent_name=Tim HTTP/1.1 200 OK Date: Tue, 03 Feb 2009 12:18:19 GMT Server: Apache/2.2.3 (Red Hat) Last-Modified: Fri, 19 Dec 2008 15:01:17 GMT ETag: "156960d-221-94be8940" Accept-Ranges: bytes Content-Length: 545 Connection: close Content-Type: text/html
如果使用&和=來分隔查詢字符串,它會起作用嗎? – Ben 2009-02-03 14:47:47