my web directory is at ip 192.168.120.3 , when I upload an image, I want the image to be stored in a different folder from my web directory, for example saved at ip 192.168.120.4, how do I do that?
This is my code :
$newname = $getFileName."-".date('YmdHis',time()).mt_rand().'.jpg';
$target = '\\\\192.168.164.5\\Common Pict\\'.$newname;
$tmp = $val['tmp_name'];
move_uploaded_file($tmp, $target);
Error :
move_uploaded_file(\192.168.164.5\Common Pict\m-20221206105651907307421.jpg): failed to open stream: Invalid argument
Code working if i upload an image to web directory:
$newname = $getFileName."-".date('YmdHis',time()).mt_rand().'.jpg';
$target = '\\\\192.168.120.3\\Common Pict\\'.$newname;
$tmp = $val['tmp_name'];
move_uploaded_file($tmp, $target);