Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/239.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP$_getwith value=";http://abc.com" 导致权限被拒绝_Php - Fatal编程技术网

PHP$_getwith value=";http://abc.com" 导致权限被拒绝

PHP$_getwith value=";http://abc.com" 导致权限被拒绝,php,Php,可能重复: 当$\u GET变量包含值“”时,页面返回“禁止。您没有访问此服务器上/GET.php的权限。” 您可以在(输出时使用var_dump($\u GET);)进行尝试 这些没问题 softwareholic.com/get.php?link=123 //output: array(1) { ["link"]=> string(3) "123" } softwareholic.com/get.php?link=http:// //output: array(1) { ["lin

可能重复:

当$\u GET变量包含值“”时,页面返回“禁止。您没有访问此服务器上/GET.php的权限。”

您可以在(输出时使用var_dump($\u GET);)进行尝试

这些没问题

softwareholic.com/get.php?link=123 //output: array(1) { ["link"]=> string(3) "123" } 
softwareholic.com/get.php?link=http:// //output: array(1) { ["link"]=> string(7) "http://" }
这些将失败

softwareholic.com/get.php?link=http://google.com  
softwareholic.com/get.php?link=http%3A%2F%2Fgoogle.com  
问题是他们在我的本地主机和downtownhost.com上工作。这个问题只出现在hostgator.com上。我也有权缩小范围


有什么想法吗?

您的主机正在强制执行
403
作为安全措施,可能是为了防止漏洞


您真的需要用户重定向到任何给定的URL吗?将可能的URL存储在数据库表中,并在querystring中传入ID,怎么样,然后查找并重定向。

此操作失败-
http://softwareholic.com/get.php?link=http://abc.
你能检查一下你的
.htaccess
是否有任何指令与此过滤器匹配/失败。@Pushpesh-问题表明.htaccess已被删除。哦!很抱歉,没有看到该部分。我正在将其用作书签,以便将location.href链接传递到我的服务器。我想这会很简单。将剥离http://并将其添加回服务器端。谢谢没问题,当剥离http://文件时,请记住您可能会得到一些https://文件,因此需要在代码中处理这些文件。