阻止访问php.ini文件

zaf*_*zaf 3 php apache security

我们在Web树的根目录中有一个自定义的php.ini和.htaccess文件.

默认情况下无法访问.htaccess,但可以访问php.ini.

例如:

http://example.com/php.ini
Run Code Online (Sandbox Code Playgroud)

是什么阻止访问php.ini文件的重新开始的过程?

Mat*_*att 14

此外,如果您必须在公共文件夹中使用它,请尝试:

<Files php.ini>
  order allow,deny
  deny from all
</Files>
Run Code Online (Sandbox Code Playgroud)