Re: image upload problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please, check that: 
http://br.php.net/manual/pt_BR/function.move-uploaded-file.php

"suresh kumar" <asureshkumar_1983@xxxxxxxxxxx> escreveu na mensagem 
news:20060629120141.30388.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 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 

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux