Writing to php://stderr
问题 I'm trying to get the use of php://stderr for writing logs to work. I'm using Slim framework which makes use of @fopen('php://stderr', 'w') for logging and really want this to work. The following test cases should work but only the first one does: // 1. error_log - works fine error_log("Written through the error_log function", 0); // 2. PHP wrapper, ie php://stderr - does not work $stderr = fopen( 'php://stderr', 'w' ); fwrite($stderr, "Written through the PHP error stream" ); fclose($stderr)