I have a form that allows someone to upload a text file, the contents of
which will be inserted into the database. When I fread() the file, there is
some garbage at the beginning and end of the text.
Here's what the text looks like:
This is the sentence of text.
Here's what it looks like after uploaded and fread():
*ch?¡®ºdä?º†Ím This is the sentence of text.SORT~€ÿÿ
The text file being uploaded is a BBedit file, which should be a plain text
file. I'm not sure where this garbage is coming, and if there's an easy way
to remove it before I put this into the Database. I searched the PHP help
files for an hour and searched here, and couldn't find anything related.
I'm using PHP 4.2.3 on a Redhat Linux server.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php