Help figuring out an uploading script problem...
| From: | Terion Miller | Date: | Mon, 30 Mar 2009 16:44:13 +0000 |
| Subject: | Help figuring out an uploading script problem... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-290844@lists.php.net to get a copy of this message | ||
I have this script that is no longer working to upload files, it goes thru
the motions and says the file is uploaded but then there is NO file in the
ArtWork folder....
any ideas?
if ($_FILES) {
for ($x=0; $x < 15; $x++) {
if (is_uploaded_file ($_FILES['Artwork']['tmp_name'][$x])) {
$ImageExt = strtolower(end(explode('.',
$_FILES['Artwork']['name'][$x])));
$ImageName = $_FILES['Artwork']['name'][$x];
$ImageSize = $_FILES['Artwork']['size'][$x];
list($width, $height, $type, $attr) =
getimagesize($_FILES['Artwork']['tmp_name'][$x]);
$sql = "INSERT INTO images (ImageDate, ArtID, AdminID,
ImageName, ImageType, ImageType2, ImageSize, ImageHeight, ";
$sql .= "ImageWidth, ImageAttr, Notes) VALUES (NOW(),
'$ArtID', '$AdminID', '$ImageName', '$ImageExt',";
$sql .= " '$type', '$ImageSize', '$height',
'$width',
'$attr', '$Notes2')";
mysql_query ($sql);
$ImageID = mysql_insert_id();
$uploadfile = "../../Artwork/". $ArtID ."_". $ImageID
.".".
$ImageExt;
move_uploaded_file($_FILES['Artwork']['tmp_name'][$x],
$uploadfile);
chmod($uploadfile, 0666);
}
}
}
Thanks
Terion
Happy Freecycling
Free the List !!
www.freecycle.org
Over Moderation of Freecycle List Prevents Post Timeliness.
Report Moderator Abuse Here:
http://www.freecycle.org/faq/faq/contact-info
Or Email Your Complaint to:
faq@freecycle.org or info@freecycle.org
------------------------------------------------
Twitter?
http://twitter.com/terionmiller
------------------------------------------------
Facebook:
<a href="http://www.facebook.com/people/Terion-Miller/1542024891"
title="Terion Miller's Facebook profile" target=_TOP><img src="
http://badge.facebook.com/badge/1542024891.237.919247960.png"
border=0
alt="Terion Miller's Facebook profile"></a>