I'm facing very odd problem. I'm managing a .php site and recently we were forced to move from php 4.x or 5.0/1 (I'm not sure which was previous version
Code: Select all
if(move_uploaded_file($_FILES['somefile']['tmp_name'],$uploaddir.$_FILES['somefile']['name']))
{
if($_FILES['somefile']['type']!="image/jpeg")
if($_FILES['somefile']['type']!="image/pjpeg")
if($_FILES['somefile']['type']!="image/png")
if($_FILES['somefile']['type']!="image/gif") print("<br><b>File is not GIF, JPEG or PNG. </b>");
$image=$_FILES['somefile']['name'];
$ok=1;
}
else
{
$ok=0;
print("<br><b><font color=\"red\">Can't load image!!</font></b><br>");
}Any tips what is causing it and how to solve it?
Problem is this is happening on production environment so I can't do proper tests...