【发布时间】:2014-07-08 19:09:12
【问题描述】:
我的 htaccess 文件中有以下内容,以防止访问我们网络之外的网站:
<Limit GET POST PUT>
order deny,allow
deny from all
allow from xx.xxx.xxx.xx
</Limit>
但这会导致以下错误:
Warning: getimagesize(http://domain.com/wp-content/uploads/2014/07/nalogo.png) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /html/wp-content/themes/test/framework/styles.php on line 60
关于如何解决此问题的任何想法? 如果我禁用 htaccess 拒绝,这将有效。
【问题讨论】:
-
没有 htaccess 指令,它可以工作吗?
-
是的,如果我的问题不清楚,对不起。
-
你试过
getimagesize('local/path/to/uploads.../nalogo.png')吗? -
从
limit中删除GET使其成为<Limit POST PUT> -
我需要拒绝 GET,因为我不希望任何人访问网络之外的网站。基本上我需要允许 PHP 访问事物但不允许用户访问...