Source Code:
(back to article)
<?php $file = '/path/to/file'; if (is_file($file)) { echo 'The path is a regular file'; } else { echo 'The path is not a regular file'; }
Result:
Report an issue