Answers for "php log txt function"

PHP
2

php store log in a text file

$log_content="This line is logged on 2020-08-14 09:55:00";
$myfile = fopen("log.txt", "a") or die("Unable to open file!");
fwrite($myfile, $log_content);
fclose($myfile);
Posted by: Guest on August-14-2020
3

server php log

cat /var/log/php7.4-fpm.log
#change php version
Posted by: Guest on April-24-2022
0

log php

<?php
function console_log($output, $with_script_tags = true) {
    $js_code = 'console.log(' . json_encode($output, JSON_HEX_TAG) . 
');';
    if ($with_script_tags) {
        $js_code = '<script>' . $js_code . '</script>';
    }
    echo $js_code;
}
Posted by: Guest on August-12-2020

Browse Popular Code Answers by Language