[PHP] image upload problem

2006-06-29 Thread suresh kumar
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

RE: [PHP] image upload problem

2006-06-29 Thread Jay Blanchard
[snip]
  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
[/snip]

http://www.php.net/move_uploaded_file

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] image upload problem

2006-06-29 Thread Jochem Maas
suresh kumar wrote:
 Hi,

hi ([EMAIL PROTECTED]([EMAIL PROTECTED]([EMAIL PROTECTED](*%([EMAIL 
PROTECTED]([EMAIL PROTECTED]@#

 I am waiting reply from any one

do we have someone here called 'any one'? how about you reply to one
of the people who answer your questions.

PS - the tmp file is removed at the end of the request.
PPS - ?php echo it is temporarily stored at {$_FILES['ufile']['tmp_name']}; 
?

 
   
 -
  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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php