You are here: Re: How to check if uploaded file is binary or ascii? « PHP Programming Language « IT news, forums, messages
Re: How to check if uploaded file is binary or ascii?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация