Re: How to check if uploaded file is binary or ascii?
- From: "Kimmo Laine" <spam@xxxxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 12:17:04 +0300
<veg_all@xxxxxxxxx> wrote in message
news:1156992615.595711.92560@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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?
how about check the type-value? It should tell the mime-type of the file.
Couldn't you use that to filter out the idiots?
$_FILES['userfile']['type']
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
spam@xxxxxxxxxxxxx || Gedoon-S @ IRCnet || rot13(xvzzb@xxxxxxxxxxxxx)
.
- References:
- How to check if uploaded file is binary or ascii?
- From: veg_all
- How to check if uploaded file is binary or ascii?
- Prev by Date: Re: Nested loops help please?
- Next by Date: Re: What editor is the most common in PHP developer?
- Previous by thread: Re: How to check if uploaded file is binary or ascii?
- Next by thread: Testers Wanted
- Index(es):