Reply to Upload Script - File types - Categorize them

Your name:

Reply:


Posted by Angelos on 07/20/05 16:43

Hello there...
I am trying to Create a script that uploads multiple files (that doesn't
really matter)
So I am looping trough the $_FILES[files][name]
while(list($key,$value) = each($_FILES['files']['name']))
{
echo $value.' ';
echo $_FILES['files']['type'][$key];
}
While I am in the loop I want to check if the file is an image or another
file and call the appropriate script.
if ($_FILES['files']['type'][$key])
upload_image();
else
upload_file();

My question is how can I check if the file is an image ?
NOTE: I have two different functions to upload files because the
upload_image() creates thumbnales and resizes an image.

Thanks for your Time !

[Back to original 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

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