I've been racking my brains on (and Googling, Tek-Tipping and PHP.Netting) this for hours...
I'm trying to check if a file exists on a network drive:
(It works for local files) e.g.
The PHP manual says you should be able to do this. I've tried forward slashes, backslashes, escaped backslashes, "file:" prefixes, even mapping a network drive and referencing the drive letter... nothing works.
I'm running PHP 5 on IIS 6 (Win Server 2003).
The file definitely exists, and can be gotten to in various ways (UNC, mapped drive, etc.) from Start | Run on the web server.
I'm not running in safe mode, and open_basedir is not set.
Any ideas? I'm not married to this particular function, just anything that will see if a file exists on the network.
Thanks,
--RHYNO
I'm trying to check if a file exists on a network drive:
Code:
$filename = '//otherserver/dir/knownfile.ext';
if (file_exists($filename)) {
echo ... // etc.
}
(It works for local files) e.g.
Code:
$filename = 'c:/pkgclnup.log';
The PHP manual says you should be able to do this. I've tried forward slashes, backslashes, escaped backslashes, "file:" prefixes, even mapping a network drive and referencing the drive letter... nothing works.
I'm running PHP 5 on IIS 6 (Win Server 2003).
The file definitely exists, and can be gotten to in various ways (UNC, mapped drive, etc.) from Start | Run on the web server.
I'm not running in safe mode, and open_basedir is not set.
Any ideas? I'm not married to this particular function, just anything that will see if a file exists on the network.
Thanks,
--RHYNO