It will be whatever the browser tell you it is, I'd create a simple script to upload to and dump the $_FILES array. I would think they would be text/php and text/html respectively.
Hi,
Following code works fine when i need to upload a file. Can anybody tell me what should $_FILES["file"]["type"] be if i want to upload a .php or a .htm file.
Searched on internet but could not find.
[PHP]if ((($_FILES["file"]["type"] == "application/pdf")
|| ($_FILES["file"]["type"] == "application/msword")||($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "application/vnd.ms-excel")
|| ($_FILES["file"]["type"] == "text/plain")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < $filesize))
{
Upload File
}[/PHP]
Thank you for Help
Umair
It will be whatever the browser tell you it is, I'd create a simple script to upload to and dump the $_FILES array. I would think they would be text/php and text/html respectively.
Brenton Alker
PHP Developer - Brisbane, Australia
blog.tekerson.com | twitter.com/tekerson | brenton.mp
Thank you. It worked.![]()