image upload problem

From: Date: Thu, 29 Jun 2006 12:01:41 +0000
Subject: image upload problem
Groups: php.general 
Request: Send a blank email to php-general+get-238902@lists.php.net to get a copy of this message
Hi, This is the code i am using for image upload. if ($_FILES['ufile']['name'] != NULL) { $FlName= $_FILES['ufile']['name']; if(!is_uploaded_file($_FILES['ufile']['tmp_name'])){ print "<Script type=\"text/javascript\"> alert(\"Error! The expected file wasn't loaded\"); </script>"; exit(); } $uploadfile = $_FILES['ufile']['tmp_name']; $uploadname = $_FILES['ufile']['name']; $uploadtype = $_FILES['ufile']['type']; $tempfile = fopen($uploadfile, 'rb'); $filedata = addslashes(fread($tempfile,filesize($uploadfile))); $UpdateAdQuery = "update ". $thisAdTableName." set LocalImageName='" . $PostLocalCopy . "', ImageData='" . $filedata . "', ImageName='" . time() . "_".$uploadname ."', mimetype ='" . $uploadtype . "' where ID=" . $mID ; $ok = @mysql_query($UpdateAdQuery); } The Code is running properly.But I dont Know Where The uploaded image is Stored in the server.I checked "/tmp" directory,but image is not there,is there any function where i can specify the location of the server where my image is to be stored i also tired move_uploaded_image() function .but its not working .I am waiting reply from any one --------------------------------- Yahoo! India Answers: Share what you know. Learn something new Click here Catch all the FIFA World Cup 2006 action on Yahoo! India Click here

« previous php.general (#238902) next »