Posted by Chung Leong on 08/31/06 03:50
veg_all@yahoo.com wrote:
> I have a script where a user can upload their csv file into a mysql
> database. The problem is sometimes a user will upload the raw excel or
> access file. How can I perform some simple checks to determine if the
> file is binary. I could do some regular expressions to check for
> unusual characters, but how would I read the file line by line?
Just look for \x00. Binary files would inevitable have it.
Navigation:
[Reply to this message]
|