|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-19 12:54 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 20:00:01 2025 UTC |
I have been trying to use newline operators and tabs in the error_log() function but for some reason they are treated as literals and I can not get newlines written into the logfile nor tabs. as you can see bellow I have tried it with an array element and a string also with \r\n or \n or \\n or \n\n.. no joy I just get everything appended to the same line.. shame //example line: error_log($error[0|1][n],3,$errorLog); // timestamp for the error entry $dt = date("Y-m-d H:i:s"); /////////////// $error[0][0] = '\t' .$dt. 'Failure: capture HTTP page request variable\n';//mark [FATAL] //$error[1][0] = '\t' .$dt. 'Success: capture HTTP page request variable\n'; $errorString = '\t' .$dt. '\tSuccess: capture HTTP page request variable\r\n'; $error[0][1] = '\t' .$dt. 'Failure: capture HTTP method request variable\n';//mark [WARNING] //script excerpt if ($request = getenv('REQUEST_URI')) { error_log($errorString,3,$errorLog); }//end if($request.. else { error_log($error[0][0],3,$errorLog); }//end else