I need to copy a file from one computer to another computer which is connected to lan network. I have IP address of that two machines. I have used code like this to achieve it ,
$file = 'file.text';// inside htdocs folder
$newfile = '\\\\192.168.1.15\\htdocsfolder\\';
if ( copy($file, $newfile) ) {
echo "Copy success!";
}else{
echo "Copy failed.";
}
but copy failed. How to debug, why file is not copied to another computer htdocs folder? whether i need to change share access on both computers?
Please help. Thanks