- 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_dir() function in PHP
The is_dir() function checks whether a file is a directory. It returns TRUE if the directory is found.
Syntax
is_dir(file_path)
Parameters
file_path − Specify the path of the file.
Return
The is_dir() function returns TRUE if the directory is found.
Example
<?php $check = "D:/tutorials"; if (is_dir($check)) echo ("Directory!"); else echo ("Not a directory!"); ?>
Output
Not a directory!
Advertisements