$var
11-06-2006, 12:07 PM
Hi, I'm using the following code in a multiple file upload,
it used to work, but i moved servers and now i get an error in the foreach area:
Warning: Invalid argument supplied for foreach()
//START IMAGE UPLOAD
$path = $_SERVER['DOCUMENT_ROOT']."/it/files/".$issueID;
if(!is_dir($path)) { //if $path isn't a dir
mkdir($path, 0755); //create it
}
foreach( $HTTP_POST_FILES as $aFile )
{
copy ($aFile['tmp_name'], $path."/".$aFile['name'])
or die ("");
}
Any ideas? The form is multi-part, in case that was a thought.
it used to work, but i moved servers and now i get an error in the foreach area:
Warning: Invalid argument supplied for foreach()
//START IMAGE UPLOAD
$path = $_SERVER['DOCUMENT_ROOT']."/it/files/".$issueID;
if(!is_dir($path)) { //if $path isn't a dir
mkdir($path, 0755); //create it
}
foreach( $HTTP_POST_FILES as $aFile )
{
copy ($aFile['tmp_name'], $path."/".$aFile['name'])
or die ("");
}
Any ideas? The form is multi-part, in case that was a thought.