6
サイトがライブのときは、trigger_error関数を使用しても問題ありませんか?以下PHPのトリガエラー関数とは何ですか?
例。
// Make the connection:
$dbc = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (!$dbc) {
trigger_error ('Could not connect to MySQL: ' . mysqli_connect_error());
}
このタイプのエラーには、try-catchが適切だとは思いませんか? –
PHPエラーは例外ではなく、別のものです。それは言語の疣贅のビットです。 – duskwuff