* use move_uploaded_file() instead of rename()
This commit is contained in:
committed by
Jeremy Newman
parent
cf870b4499
commit
cb710aa5b9
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user