我在页面上显示以下几个php错误:Notice: Undefined index
我有/etc/php/5.6/fpm/php.ini
和display_errors = Off
将值设置为On
时,我会在页面上发现更多错误。
我的htaccess文件为空,vHost conf为:
<VirtualHost *:80>
ServerName website1.tld
DocumentRoot /home/website1
ErrorLog /var/log/sites/ website1_error_log
CustomLog /var/log/sites/ website1_access_log combined
DirectoryIndex index.php index.html index.htm index.php4 index.php5
<Directory /home/website1>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock|fcgi://localhost/"
</FilesMatch>
RewriteEngine on
</VirtualHost>
谢谢
答案 0 :(得分:0)
您不必在此/etc/php/5.6/fpm/php.ini中进行任何更改。您可以在应用程序/文件的顶部放置error_reporting(0)。
<?php
// Turn off error reporting
error_reporting(0);