PCHomepage
Programmer
I have a file upload form that WAS working but now all of a sudden it is giving an error that it is unable to move the temp file. Looking at the temp tile name supplied in one case, it is [bold]php1NsZFZ[/bold] but the files in the temp folder have a dot: [bold]php.1NsZFZ[/bold]. Nothing was changed in the code from when it was working so I am at a loss. The files are being retrieved with:
etc.
Any ideas?
Code:
$EntryType = $_SESSION['ProcessType'];
foreach ($Files["error"] as $key => $error):
if ($error == UPLOAD_ERR_OK):
$tmp_name = $Files["tmp_name"][$key];
$Filename = $Files["name"][$key];
$Size = ($Files["size"][$key]);
$FileTime = filemtime($Files["tmp_name"][$key]);
$Filename = trim(str_replace(" ", "_", $Filename));
$Pieces = explode("_", $Filename, 2);
$Subfolder = $Pieces[0];
$oldumask = umask(0);
if (!is_dir("$UploadPath/$EntryType")) mkdir("$UploadPath/$EntryType", 01777);
umask($oldumask);
$oldumask = umask(0);
if (!is_dir("$UploadPath/$EntryType/$Subfolder")) mkdir("$UploadPath/$EntryType/$Subfolder", 01777);
umask($oldumask);
$Folder = "$UploadPath/$EntryType/$Subfolder";
etc.
Any ideas?