PHP:allow_url_include
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5633813/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PHP: allow_url_include
提问by Senica Gonzalez
Quick...possibly stupid question.
快......可能是愚蠢的问题。
When allow_url_include is set to off, does that prohibit other computers from remotely including the files on my site, or does it say that I'm not allowed to remotely include files from other sites?
当allow_url_include 设置为off 时,是禁止其他计算机远程包含我站点上的文件,还是说我不允许远程包含其他站点的文件?
采纳答案by Gareth
Settings in yourphp.ini only affect yourPHP installation
在设置你的php.ini只会影响你的PHP安装
回答by Achilleterzo
As said in the php manual: http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-includeis for including remote files, only if you let your directory to reach the source, others can include your php files.
如php手册中所述:http: //www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include用于包含远程文件,仅当您让您的目录到达源,其他人可以包含您的 php 文件。
Then is the second suggestion
然后是第二个建议
回答by Pascal MARTIN
Setting allow_url_include
to off
in yourconfiguration means that yourPHP code on yourserver will not be able to include remote files.
在您的配置中设置allow_url_include
为意味着您服务器上的PHP 代码将无法包含远程文件。off
But it doesn't change anything for other servers, which might request files from your server, like anyone can from the web -- note, though, that if some PHP file is requested, it'll be interpreted, and its output (not its content ! )will be sent.
但它并不适用于其他服务器改变什么,这可能与您的服务器请求的文件,如任何人可以从Web -但是请注意,如果请求一些PHP文件,它会被理解,其输出(不它的内容!)将被发送。
回答by Your Common Sense
It's alwaysimpossible to include PHP codefrom properly installed server, no matter of this configuration setting.
它总是不可能有PHP代码的正常安装的服务器,没有此配置设置的问题。
At the same time no PHP configuration setting can forbid HTTP clientsfrom requesting resources from your HTTP server.
同时,没有任何 PHP 配置设置可以禁止HTTP 客户端从您的 HTTP 服务器请求资源。