I need to copy a file from one computer to another computer that is connected to the local network. I have the IP address of these two machines. I used this code for this,
$file = 'file.text';
$newfile = '\\\\192.168.1.15\\htdocsfolder\\';
if ( copy($file, $newfile) ) {
echo "Copy success!";
}else{
echo "Copy failed.";
}
but the copy failed. How to debug, why the file is not copied to another htdocs folder of the computer? Do I need to change the sharing on both computers?
Please, help. Thanks
source
share