PHP directry functions

Functions Description
scandirList of All files and directories present inside a directory
getcwdGet Current working directory details
chdirChange the current directry to new directory

Open the directory handle, returns False on failure.
Read entry from directory handle.
Close directory handle
Listing files and directories inside a directory

dirname to gate name of the directoy and path

We can get directy name from the string we provide as input.
echo dirname($var);
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 ";
PHP File handling
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer