PHP directry functions
|scandir||List of All files and directories present inside a directory |
|getcwd||Get Current working directory details|
|chdir||Change the current directry to new directory|
dirname to gate name of the directoy and path
We can get directy name from the string we provide as input.
Output is here
is_dir to check if directory name is true or not
is_dir() function returns True or False to know if file name is directory or not. We will check by if condition.
echo "This is a directory : $var ";
echo "This is NOT a directory : $var ";
Subscribe to our YouTube Channel here
This article is written by plus2net.com team.