Answers for "php log to cli"

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

how to log out php

session_destroy();
session_unset();
unset($_SESSION["loggedin"]);
$_SESSION = array();
Posted by: Guest on July-13-2021

Browse Popular Code Answers by Language