[thelist] PHP uploading an image PHP

Rich Gray rich at f1central.net
Mon Jan 27 06:11:01 CST 2003


Andrew

I don't know what version of PHP you are running or on which OS platform but
you should probably be doing something similar to this in uploadItem.php ...

if (is_uploaded_file($_FILES['image']['tmp_name']) {

move_uploaded_file($_FILES['image']['tmp_name'],"$WebRoot/images/$ItemID.jpg
");
}
else {
	// Error handling
}

Check the handling file uploads section in the PHP manual for more info

Rich
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Andrew Maynes
Sent: 27 January 2003 09:36
To: thelist at lists.evolt.org
Subject: [thelist] PHP uploading an image PHP


Hi All

I am trying to upload an image using three php scripts addPicture.php
upload.php
and uploadItem.php that just will not upload all permissions are set
correctly..
http://www.bleubolt.co.uk/Cart/admin/addPicture.php any ideas why... here
are
the three scripts

[snip]




More information about the thelist mailing list