Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I need to hide parse errors for PHP files within a folder, but leave that one for all other PHP files. How would I do this?
首先是一个好问题,恕我直言,也是一个有效的问题。
在要隐藏 PHP 错误的相关文件夹的 .htaccess 中,将此行放在文件顶部:
php_flag display_errors off
这将仅影响该文件夹并掩盖该文件夹内 PHP 文件的 PHP 错误,而站点的其余部分将不受影响。