#26086 [Opn->Fbk]: Weird Output
ID: 26086
Updated by: moriyoshi@php.net
Reported By: mite_tea_big at hotmail dot com
-Status: Open
+Status: Feedback
Bug Type: Output Control
Operating System: Windows XP
PHP Version: 4.3.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-11-02 17:47:29] mite_tea_big at hotmail dot com
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 this bug report at http://bugs.php.net/?id=26086&edit=1
Thread (3 messages)