- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
is_executable() function in PHP
The is_executable() function checks whether a file is executable. It returns TRUE if the file exists and is executable. It returns FALSE on error.
Syntax
is_executable(file_path)
Parameters
file_path − The path of the file.
Return
The is_executable() function returns TRUE if the file exists and is executable. It returns FALSE on error.
Example
<?php $check = "D:/tutorials/setup.exe"; if (is_executable($check)) echo ("Executable!"); else echo ("Not executable!"); ?>
Output
Executable!
Let us see another example.
Example
<?php $check = "D:/tutorials/java.docx"; if (is_executable($check)) echo ("Executable!"); else echo ("Not executable!"); ?>
Output
Not executable!
Advertisements