Verify the executability of the given filename:
<?php $file = “setup.exe”; if(is_executable($file)) { echo (“$file is executable”); } else { echo (“$file is not executable”); } ?> |
What the code above might produce is:
setup.exe is executable |
The function is_executable() determines if the filename provided is executable.
Note: This function caches its output. To clear the cache, use clearstatcache().
is_executable(file) |
Parameter |
Description |
file |
Essential. gives the location of the file to be checked. |
Return Value: |
When a file fails, it returns FALSE and an E_WARNING, and TRUE otherwise. |
PHP Version: |
4.0+ |