|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-03 03:03 UTC] moriyoshi@php.net
[2003-11-17 18:16 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 20:00:01 2025 UTC |
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 ?????????