jpratt Posted December 6, 2007 Share Posted December 6, 2007 I am using $_FILES['userfile']['name'] to get a name of a file to copy from a users machine to place on a thumb drive. The user is basically copying the file from a local path to a local path using a portable version of php on their own comp. How do i get the path for copying the file? I have a form with enctype="multipart/form-data". How can i get the source path? Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted December 6, 2007 Share Posted December 6, 2007 Just an example... <?php // your upload directory $uploadDir = 'path_to_your_directory/'; // your file which is uploaded $frfilename=$_FILES['userfile']['name']; // your path..... is this $filePathgif = $uploadDir.$frfilenamegif; // echo and confirm... echo "$filePath"; ?> Quote Link to comment Share on other sites More sharing options...
jpratt Posted December 7, 2007 Author Share Posted December 7, 2007 Thanks for the help but that gives me the desination wich is not the problem, I am trying to get the entire source path to copy from. When I do $_FILES['userfile']['name'] it gives me the source filename but nothing before it? is there a way to get the entire source destination? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.