ファイルが存在するかどうかを調べる file_exists
ウインドウズ共有の使用: ウインドウズ上でネットワーク共有上のファイルを調べるには、 //computername/share/filenameまたは
\\computername\share\filenameを使用して下さい。
<?php
$filename = '/path/to/foo.txt';
if (file_exists($filename)) {
print "The file $filename exists";
} else {
print "The file $filename does not exist";
}
?>