I want to check if files exists in the network folder (eg. path = "U:\abc\def\") using php.
I tried to use following:
if(file_exists("U:/abc/def/400abc.doc")) {
echo "YES";
} else {
echo "NO";
}
I get NO. I also tried path = "//abc-drive/folder-main/abc/def/400abc.doc" but still it doesn't work.
The files are on a network/shared folder and NOT in subfolders from where php server runs
Can anyone please tell HELP?
Regards
This won't work if PHP has safe_mode enabled. Try setting safe_mode_include_dir
to add an exception, and reference the location with the syntax \\computername\share\filename
.