* use move_uploaded_file() instead of rename()

This commit is contained in:
Jonathan Ernst
2005-01-27 17:40:09 +00:00
committed by Jeremy Newman
parent cf870b4499
commit cb710aa5b9

View File

@@ -71,7 +71,7 @@ class Screenshot {
$this->iScreenshotId = mysql_insert_id();
}
else return false;
if(!rename($hFile['tmp_name'], "data/".$this->sDirectory."/originals/".$this->iScreenshotId))
if(!move_uploaded_file($hFile['tmp_name'], "data/".$this->sDirectory."/originals/".$this->iScreenshotId))
{
// whoops, moving failed, do something
addmsg("Unable to move screenshot from ".$hFile['tmp_name']." to data/".$this->sDirectory."/originals/".$this->iScreenshotId, "red");