note 114621 added to function.uniqid

From: Date: Thu, 13 Mar 2014 05:43:15 +0000
Subject: note 114621 added to function.uniqid
Groups: php.notes 
Request: Send a blank email to php-notes+get-198879@lists.php.net to get a copy of this message
I guess, this is not a bugs, just a note for someone newbie like me, i've got problem on uploading image, i tested on local server, it works fine but when i upload on my hosting site , the scripts failed (i use shared hosting, so i' m helpless), this is a part of my scripts: $ext=$this->_fuphandler->extractExtension($data); $strsha=sha1($this->_fuphandler->extractFilename($data)); $r=sprintf($pathToRoot.$dest.'%s.%s',$strsha,$ext); // filename builder $rawsrc = $data['tmp_name']; if(!move_uploaded_file($rawsrc,$r)) {....} it should work, it did on my uniform server, but it didn't on my hosting so i spend many hours on trying, then i try to change the $strsha=uniqid(); and it works... i know it's just a silly thing, ...hehehe, beside i'm just a newbie, but probably will help someone who has some problem like me. ---- Server IP: 72.52.91.14 Probable Submitter: 202.152.195.71 ---- Manual Page -- http://php.net/manual/en/function.uniqid.php Edit -- https://master.php.net/note/edit/114621 Del: integrated -- https://master.php.net/note/delete/114621/integrated Del: useless -- https://master.php.net/note/delete/114621/useless Del: bad code -- https://master.php.net/note/delete/114621/bad+code Del: spam -- https://master.php.net/note/delete/114621/spam Del: non-english -- https://master.php.net/note/delete/114621/non-english Del: in docs -- https://master.php.net/note/delete/114621/in+docs Del: other reasons-- https://master.php.net/note/delete/114621 Reject -- https://master.php.net/note/reject/114621 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#198879) next »