email - Grab Warning and error messages and cast them in a variable with PHP -


i've got cron job , when run in terminal displays warning: warning: mysql_query() expects parameter 2 resource, boolean given in /dbcon.php on line 116.

i grab above text , put them variable can send email.

what have done this:

//debugging ...   if ($this->dbh === false) {       //get warning/error type.....       $error = error_reporting(e_error | e_warning);           //get script name...       $file = $_server['php_self'];        //get current file name...       $class = __file__;        //send email if connect() return false...       $this->process($error, $file, $class);             } 

however, $error sent email code. i've tried error_log() couldn't make work. had @ other sof 'similar' posts did not have success.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -