From cb710aa5b93e3eca5def2f043f471e416f4863fa Mon Sep 17 00:00:00 2001 From: Jonathan Ernst Date: Thu, 27 Jan 2005 17:40:09 +0000 Subject: [PATCH] * use move_uploaded_file() instead of rename() --- include/screenshot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/screenshot.php b/include/screenshot.php index 79b4926..ae28599 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -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");