From: mite_tea_big at hotmail dot com Operating system: Windows XP PHP version: 4.3.3 PHP Bug Type: Output Control Bug description: Weird Output
Description: ------------ I was trying out different methods to input data from a file. I was using file_get_contents to read a file, then echo to output the string. The thing is, it seems to be outputting extra characters, mostly asian characters. It looks as if the html tags and other text are being changed to "?". if I remove all other non-php text, the extra output does not show up. Reproduce code: --------------- <?php $data = file_get_contents("Library.txt"); echo $data; ?> <html> </html> text.txt -------- ABCDEFGHIJKLMONPQRSTUV Expected result: ---------------- ABCDEFGHIJKLMONPQRSTUV Actual result: -------------- ABCDEFGHIJKLMNOPQRSTUVWXYZ ΈρΤ΅㹬਍⼼¬’›Iാഊ View Source ----------- ABCDEFGHIJKLMNOPQRSTUVWXYZ ????????? -- Edit bug report at http://bugs.php.net/?id=26086&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26086&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26086&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26086&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26086&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26086&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26086&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26086&r=support Expected behavior: http://bugs.php.net/fix.php?id=26086&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26086&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26086&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26086&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26086&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26086&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26086&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26086&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26086&r=float