- struggled to make ajax works, but now is ok

- starting to make serverside works
This commit is contained in:
asus
2024-02-23 19:36:03 +01:00
parent 7cfa2e6351
commit b7685cbbc1
9 changed files with 428 additions and 37 deletions

View File

@@ -4,12 +4,15 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
https://stackify.com/how-to-log-to-console-in-php/
*/
function console_log($output) {
function console_log(...$outputs) {
if (FIPFCARD_CONSOLE_OFF)
return;
$json_output = json_encode($output, JSON_HEX_TAG);
$js_code = '<script>console.log(' . $json_output . ');</script>';
echo $js_code;
foreach($outputs as $output)
{
$json_output = json_encode($output, JSON_HEX_TAG);
$js_code = '<script>console.log(' . $json_output . ');</script>';
echo $js_code;
}
}