描述:
bool file_exists
( string
$filename
)
Checks whether a file or directory exists.
範例:
<?php
$filename = '/path/to/foo.txt';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}?>
沒有留言:
張貼留言