PHP: trigger_error – Manual
Beware, trigger_error() is absolutely useless for transporting your own function’s error messages in $php_errormsg:ini_set(‘track_errors’, TRUE);function x() { trigger_error(‘MY ERROR’); }@x();echo „Error 1: \“$php_errormsg\“\n“;@file_get_contents(‘/nonexisting’);echo „Error 2: \“$php_errormsg\“\n“;This outputs:Error 1: „“Error 2: „failed to open stream: No such file or directory“This behaviour is consistent with the description of $php_errormsg, which says that the variable will only be…
PHP: trigger_error – Manual Read More »









