UPLOADING TROUBLE
Posted: Sun Apr 02, 2006 8:26 pm
So ive been able to use this method in the past for uploading files locally.
When i moved it to my server it doesn't even get the value for $origname.
I checked the phpinfo and it says fileuploads are on.
Any suggestions?
When i moved it to my server it doesn't even get the value for $origname.
I checked the phpinfo and it says fileuploads are on.
Any suggestions?
Code: Select all
include ("pics_functions.php");
include ("settings.php");
$origname = $_FILES['userfile']['name'] ;
$tmp_name = $_FILES['userfile']['tmp_name'] ;
if(empty($origname)) {
$error += "No PHOTO";
}
$newuploadDir = $uploadDir;
$uploadFileDir = $newuploadDir ."/" . $origname;
$origname = strtolower($origname);
if (( strpos($origname,".jpg") !== false
|| strpos($origname,".jpeg") !== false
) )
{
if(strpos($origname,".jpg") || strpos($origname,".jpeg")) {
if (move_uploaded_file($tmp_name, $uploadFileDir)){
if(resizejpg($x, $y, $uploadFileDir, $uploadFileDir, 0)) { //success total
}
else {
echo "Unable to resize photo.<br>Photo not uploaded.";
unlink($uploadFileDir);
$error += "No Rezise";
}
}else {
echo "Can't photo file!?!?!!?!?!?!?!<br>Photo not uploaded.";
unlink($uploadFileDir);
$error += "no movement";
}
}else {
echo "This isn't a JPEG.<br>File not uploaded.";
unlink($uploadFileDir);
$error += "Not a JPEG";
}
}