Jump to content

file upload trouble


jpratt

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/80398-file-upload-trouble/
Share on other sites

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";
?>

Link to comment
https://forums.phpfreaks.com/topic/80398-file-upload-trouble/#findComment-407681
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/80398-file-upload-trouble/#findComment-409293
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.