我使用的是wp cli,在运行wp export时会出现php通知和错误。其中一些警告和错误最终会出现在输出文件中。如何强制错误不显示。我试过了ini_set(\'display_errors\', 0);
和error_reporting(0);
在wp wp配置中。php
root@roc-apache-4:/var/www/blogs/html# wp export --quiet=true --debug=false --url=http://blogs.democratandchronicle.com/fleet-feet-beat/ --dir=/root/wordpress_exports --file_item_count=100000000
PHP Notice: date_default_timezone_set(): Timezone ID \'America/New York\' is invalid in phar:///usr/bin/wp/php/wp-cli.php(21) : eval()\'d code on line 16
PHP Notice: Constant ABSPATH already defined in phar:///usr/bin/wp/php/wp-cli.php(21) : eval()\'d code on line 68
PHP Notice: Undefined index: combineCommentCounts in /var/www/blogs/html/wp-content/plugins/facebook-comments-for-wordpress/facebook-comments.php on line 265
Notice: Undefined index: combineCommentCounts in /var/www/blogs/html/wp-content/plugins/facebook-comments-for-wordpress/facebook-comments.php on line 265
PHP Notice: define() was called with an argument that is <strong>deprecated</strong> since version 3.0! The constant <code>VHOST</code> <strong>is deprecated</strong>. Use the boolean constant <code>SUBDOMAIN_INSTALL</code> in wp-config.php to enable a subdomain configuration. Use is_subdomain_install() to check whether a subdomain configuration is enabled. in /var/www/blogs/html/wp-includes/functions.php on line 3466