|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-21 13:04 UTC] sander@php.net
[2003-02-24 14:54 UTC] Slava at Philips dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 23:00:01 2025 UTC |
Hello, I just installed PHP4.2.0 RC4 on my System using IIS 5.1 with all patches. I installed PHP as ISAPI module, I ran before PHP 4.1.2 as CGI where the following worked correctly: A propgram running in background saves every 10 secons the actual traffic into a file "jetzt.log", each line is separeted with a carraige return and a line feed "\r\n" - like any other textfile under windows. For example it looks as the following: 34.865 9.763 0 Tage 1 Stunden 9 Minuten 41 Sekunden 16 And here is my script: <? $fp = fopen("jetzt.log","r"); $file = fread($fp, filesize ("jetzt.log")); fclose($fp); $haufen = explode("\r\n", $file) echo "Downstream: ".$haufen[0]."<br />\r\n"; echo "Upstream: ".$haufen[1]."<br />\r\n"; echo "Uptime: ".$haufen[2]."<br />\r\n"; echo "CPU Usage: ".$haufen[3]."%"; ?> In PHP 4.1.2 the content of jetzt.log was seperated into the array $haufen and the script printed it fine out. Since PHP 4.2.0 all content of jetzt.log is written into $haufen[0], including carriage returns and line feeds. It is the same when I only use "\r" as seperator; when I use "\n", the content is correctly seperated but at the end of each line there is stil a carriage return. I found a comparable problem at http://bugs.php.net/bug.php?id=3428 Best regards Mark Aslan Kuschel