Toggle navigation
HOME
plus2net HOME
SQL
JavaScript
HTML
Python
ASP
jQuery
C
PhotoShop
PHP
PHP Home
Beginners guide
Loops
Date
Form
Array
String
Math
Mail
File - directory
curl
PHP & XML
GD: graphs
Calendar
Filters
PHP MySQL
PDO
MySQLi
Session
Scripts
PDF Generation
File Functions
Submit
Login
×
Login
Username
Password
Login
Contact Us
PHP directry functions
Functions
Description
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.
$var='https://www.plus2net.com/sql_tutorial/math.php';
echo dirname($var);
Output is here
https://www.plus2net.com/sql_tutorial
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.
$var='test_dir';
if(is_dir($var)){
echo "This is a directory : $var ";
}else{
echo "This is NOT a directory : $var ";
}
This article is written by
plus2net.com
team.
Be the first to post comment:
plus2net.com
PHP Directory Functions
PHP Directory handling functions
scandir: Array Listing all directory and files of any given directory
getcwd: to get the current directory name
chdir: to change the current directory
Post your comments , suggestion , error , requirements etc here .
Detail
✖
We use cookies to improve your browsing experience. .
Learn more
HTML
MySQL
PHP
JavaScript
ASP
Photoshop
Articles
FORUM
.
Contact us
©
2000-2021
plus2net.com
All rights reserved worldwide
Privacy Policy
Disclaimer