From: venkateshp_2004 at yahoo dot com Operating system: windows 2000 PHP version: 5CVS-2004-03-24 (dev) PHP Bug Type: Output Control Bug description: Problem in outputbuffer
Description: ------------ Hi..! When i write the contents of the buffer which contains the data from ob_get_contents() in a file, Instead of '\n' I am getting the unknown charecter when i opend with the the file by using notepad.It is creating big problem when make CRC32check of the two files.I would be thankfull to you if you could solve it. yours, venki Reproduce code: --------------- <?php ob_start(); echo "\nThis is the test-line1\n"; echo "\n this is the test-line2\n"; $data=ob_get_contents(); $filename="test.txt"; $handle=fopen($filename,"a+"); fwrite($handle,$data); ?> Expected result: ---------------- In the file "test.txt" I am expecting the following contents in the file when i opend with the notepad (not with the php editor). This is the test line1 This is the test line2 Actual result: -------------- But i am getting some unknown symbol like this... 0This is the test line1 00This is the test line20 -- Edit bug report at http://bugs.php.net/?id=27671&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27671&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27671&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27671&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27671&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27671&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27671&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27671&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27671&r=support Expected behavior: http://bugs.php.net/fix.php?id=27671&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27671&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27671&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27671&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27671&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27671&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27671&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27671&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27671&r=float
