<?php[...]
echo "BEFORE\n";
error_log("abc");
echo "AFTER\n";
supaplex$ curl http://localhost:8013/
BEFORE
AFTER
Why *abc* does not appear?
Because error_log() does not produce any output:
<https://www.php.net/manual/en/function.error-log.php>
"error_log — Send an error message to the defined error handling routines"
And the error handling routines may not send the log message to the
output but only to the error log which is *not* send via HTTP to the client.
Next time please read the PHP manuals first, before asking here.
Il 29/11/22 21:20, Arno Welzel ha scritto:
Because error_log() does not produce any output:
<https://www.php.net/manual/en/function.error-log.php>
"error_log — Send an error message to the defined error handling
routines"
And the error handling routines may not send the log message to the
output but only to the error log which is *not* send via HTTP to the
client.
Next time please read the PHP manuals first, before asking here.
Practically error_log() varies its behavior based on the API server (https://www.php.net/manual/en/function.php-sapi-php)?
Il 29/11/22 21:20, Arno Welzel ha scritto:
Because error_log() does not produce any output:
<https://www.php.net/manual/en/function.error-log.php>
"error_log — Send an error message to the defined error handling
routines"
And the error handling routines may not send the log message to the
output but only to the error log which is *not* send via HTTP to the
client.
Next time please read the PHP manuals first, before asking here.
Practically error_log() varies its behavior based on the API server (https://www.php.net/manual/en/function.php-sapi-name.php)?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 349 |
Nodes: | 16 (2 / 14) |
Uptime: | 119:34:27 |
Calls: | 7,612 |
Files: | 12,787 |
Messages: | 5,684,033 |