Hi all, I'm writing a script to upload some files to a mysql DB and I've heard that you can just extract bits from the HTTP_HEADER
to get things like the file type, file size, and file name. Is this true? If so...those three things are just what I need, and i't d be fantastic
if someone could let me know how to do this. Thanks in advance.
Need Some HTTP_HEADER Help
Moderator: General Moderators
- snowrhythm
- Forum Commoner
- Posts: 75
- Joined: Thu May 04, 2006 1:14 pm
- Location: North Bay Area, CA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
stat() perhaps?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
The details found on the following may be of more use.
http://php.net/features.file-upload
Also, be aware that the type specified in $_FILES is unreliable. Analyze the file's contents. mime_content_type() may be of interest there.
http://php.net/features.file-upload
Also, be aware that the type specified in $_FILES is unreliable. Analyze the file's contents. mime_content_type() may be of interest there.
- snowrhythm
- Forum Commoner
- Posts: 75
- Joined: Thu May 04, 2006 1:14 pm
- Location: North Bay Area, CA