Member
addison
How to check if file exists in PHP?
darion
@addison use file_exists() function to check if file exists or not in PHP, code:
1 2 3 4 5 6 7
<?php $path = '/path/to/file.txt'; if (file_exists($path)) { echo "file exists"; }