Image Upload Script
Posted: Mon Sep 06, 2010 11:00 am
I am playing with an image upload script and everything seems to be working, but I get this error/warning message,
[text]Deprecated: Function eregi() is deprecated in....[/text]
Looks like eregi will no longer be available in PHP6. Does anyone know what I can use instead of eregi in the below code?
ANy help would be greatly appreciated.
[text]Deprecated: Function eregi() is deprecated in....[/text]
Looks like eregi will no longer be available in PHP6. Does anyone know what I can use instead of eregi in the below code?
Code: Select all
if(!eregi('image/', $_FILES['attachement']['type'])) {
echo 'The uploaded file is not an image please upload a valid file!';
}