Answers for "php error log in console"

PHP
6

php console log

// Assuming you are wishing to log to the JS Console...

<?php
	function consoleLog($msg) {
		echo '<script type="text/javascript">' .
          'console.log(' . $msg . ');</script>';
	}

	consoleLog('Hello, console!');
?>
Posted by: Guest on March-07-2020
0

php error log

// Php Error Log
error_log("Error message");

// Log and Array
error_log( print_r( [
  __METHOD__,
  'error_key_1' => 'error_value'
] ) );
Posted by: Guest on August-10-2021

Browse Popular Code Answers by Language