facebook PHP SDK忽略错误

facebook PHP SDK忽略错误,php,facebook,sdk,Php,Facebook,Sdk,我正在使用Facebook PHP SDK,但我想忽略这些错误。它们正在打印,给用户带来麻烦。有什么办法可以防止它发生吗 谢谢。 <?php // Turn off all error reporting error_reporting(0); // Report simple running errors error_reporting(E_ERROR | E_WARNING | E_PARSE); // Reporting E_NOTICE can be good too (to

我正在使用Facebook PHP SDK,但我想忽略这些错误。它们正在打印,给用户带来麻烦。有什么办法可以防止它发生吗

谢谢。


<?php

// Turn off all error reporting
error_reporting(0);

// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

// Report all PHP errors (see changelog)
error_reporting(E_ALL);

// Report all PHP errors
error_reporting(-1);

// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);

?>

但是,请尝试删除错误,而不是忽略它们。

“我刚刚砍掉了我的手。我怎么能忽略溅满屏幕的鲜血呢?”。存在错误消息是有原因的。修复错误,消息就会消失。