無論我嘗試過什麼,當通過web服務器或cli執行php腳本時,我都會收到「警告」消息。禁用PHP警告
我對CLI配置輸出:
php -i | grep 'error'
display_errors => Off => Off
display_startup_errors => Off => Off
error_append_string => no value => no value
error_log => /var/log/php-7.0.log => /var/log/php-7.0.log
error_prepend_string => no value => no value
error_reporting => -32768 => -32768
html_errors => Off => Off
ignore_repeated_errors => Off => Off
log_errors => Off => Off
log_errors_max_len => 1024 => 1024
track_errors => Off => Off
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
intl.error_level => 0 => 0
opcache.error_log => no value => no value
但無論如何,當我執行WP-CLI命令我真的越來越:
php /usr/bin/wp-source --quiet --path=$HOME/app/public_html option get siteurl
Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in /home/user/app/public_html/wp-includes/functions.php on line 3549
http://example.com
仍然相同,其實我alraedy有「〜E_ALL」 –