0

Hi...
I want to move an uploaded file to another machine.I had given the file path to move_uploded_file() function including IP address .The folder is a shared folder.My code shown below.

<?php
if ($_FILES["file"]["error"] > 0)
  {
  echo "Error: " . $_FILES["file"]["error"] . "<br />";
  }
else
  {
  echo "Upload: " . $_FILES["file"]["name"] . "<br />";
  echo "Type: " . $_FILES["file"]["type"] . "<br />";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
   move_uploaded_file($_FILES["file"]["tmp_name"],"192.168.0.23/E:/pdf/" . $_FILES["file"]["name"]);


  echo "Stored in: " . "upload/" . $_FILES["file"]["name"];

  }
?>

I am getting the error like as

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to access 192.168.0.23/E:/pdf/Picture 240.jpg in C:\xampp\htdocs\divya\fileupload\upload_file.php on line 11

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by emiola
0

You have to state your file move part with something such as "\\192.168.0.23\ ... until you get to the final file destination. I think it is similar to trying to access another machine on your network through a browser such as \\ipaddress of the machine\
I hope this works.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.