且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在PHP中正确使用`.user.ini`文件?

更新时间:2022-12-05 22:30:49

文件说:

这些文件仅由CGI/FastCGI SAPI处理

These files are processed only by the CGI/FastCGI SAPI

如果您使用的是Apache,请使用.htaccess文件以达到相同的效果.

If you are using Apache, use .htaccess files for the same effect.

因此,如果您将PHP作为Apache模块,从命令行或使用内置服务器运行,则不会处理.user.ini-文件.

So if you run PHP as an Apache module, from the commandline, or using the builtin-Server, the .user.ini-files are not processed.

要查找服务器API,只需生成一个包含以下内容的PHP脚本,然后在您的Web浏览器中调用它即可:

To find out your Server API, simply generate a PHP script with the following content and call it in your webbrowser:

<? phpinfo();