I have a window drive mounted as
\\192.168.0.168\
It is mounted as Z drive
There this file in folder DOC,MYFOLDER,FILE1.PDF that I wanna readfile() or copy out through php (I will use it to copy other file also)
However I also tried stuffs like
$file_path = "\\192.168.0.168\DOC\MYFOLDER\FILE1.pdf";
$filesize = ($file_path);
echo "FILE SIZE IS $filesize";
it return no value, just FILE SIZE IS
How do I access my Z drive or the 192.168.0.168\DOC\MYFOLDER\FILE1.pdf as I wanna share this Network drive file to my IIS Web Server so user can download the PDF through my web server.
Thanks!
The backslash \
is the escape character, it needs to be escaped:
$file_path = "\\\\192.168.0.168\\DOC\\MYFOLDER\\FILE1.pdf";
Please note that PHP does not support Windows network authentication. You may be able to hack your way through, but I would rather mount the network location as a network drive.