[PHP] Re: File upload in map drive with PHP

2012-01-26 Thread Jim Giner
Do you mean you are trying to do an upload of a file on a mapped drive, such 
as a network drive?  Is this upload using an html form with an input 
type=file tag? 



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



Re: [PHP] Re: File upload in map drive with PHP

2012-01-26 Thread Stuart Dallas
On 26 Jan 2012, at 15:10, Mehmet YAYLA wrote:

 
 I'm using code this bellow.
 
 
 ?
 if (!empty($_GET[upload])) {
$uploaddir =x:\\file/;
 
$uploadfile = $_FILES['userfile']['name'];
 
print pre;
 
if (move_uploaded_file($_FILES['userfile']['tmp_name'], 
 $uploaddir.$uploadfile)) {

   echo Dosya basari ile yüklendi. ; 
   
  
}  else {
   print Dosya yüklenemedi. Tekrar deneyiniz;
  
   }
print /pre;
 }
 
 ?
 
 form enctype=multipart/form-data action=upload_file.php?upload=1 
 method=post input type=hidden name=MAX_FILE_SIZE value=3 /
Select image: input name=userfile type=file/
input type=submit value=Upload /

The drive needs to be mapped for the internet user (usually IUSR_machinename I 
think), otherwise that drive won't exist.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

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



Re: [PHP] Re: File upload in map drive with PHP

2012-01-26 Thread Jim Lucas

On 01/26/2012 07:13 AM, Jim Giner wrote:

You're using a GET in your script when your form is a POST.


and if you look at the method value you will see that he is passing 
upload=1 in the URL.  Which would be seen as a GET value.


--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/

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