spike_ph_77 Posted September 18, 2007 Share Posted September 18, 2007 I'm trying to copy a file from a network mapped drive onto the webserver. The problem is that it will read the file, but it won't move/upload the file. My code that I have so far is this: ------------------------------------------------------------------------------------------- index.php: <form name="imgform" enctype="multipart/form-data" method="POST" action="./do_work.php"> <input type="hidden" name="userfilename" id="userfilename"></input> Choose a file to strip lines out of: <input name="varFile" type="file" onChange="javascript:top.document.imgform.userfilename.value= top.imgform.varFile.value"></input><br /> <input type="submit" value="Strip Lines" name="strip" /> ------------------------------------------------------------------------------------------- do_work.php $file = $_POST['userfilename']; $target_path = "./uploads/"; $target_path = $target_path . basename( $_FILES['varFile']['name']); echo "<img src='$file'/>"; if(move_uploaded_file($file, $target_path)) { echo "Moved"; } else { echo "Not Moved"; } //copy($file, $target_path); --------------------------------------------------------------------- As you see, if I insert an image to upload it will display the image on the webpage, but it won't move the image to the uploads directory from the I: which is the mapped drive. I even tried the copy() but again it didn't work. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/69771-file-upload-from-mapped-drive/ 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.