开发者

php $_GET error

$url = $_GET['url'];
echo "$url";
开发者_Go百科

and I request /test.php?url=ok

gives me ok as output..

but I use a url test.php?url=http://google.com

gives me 403- Forbidden error.. I donno why it's not working ..

Please help me..


This is often caused by overcautious settings of mod_security, an Apache extension. You'll have to consult your provider. (But they usually disable this individually or relax the settings.)


Since characters like : and / etc are special characters in URLs, you cannot use them as part of a query string like that. You need to encode what you are passing in as a URL - in php that is done by the urlencode function, and will look like this:

test.php?url=http%3A%2F%2Fgoogle.com


I added SecFilterEngine Off to .htaccess . and it solved the problem it's basically mod_security .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜