Home >> PHP >> dirname() function in PHP

dirname() function in PHP

The dirname() function returns the parent directory name from a path.

Syntax

dirname(filepath)

Example

echo dirname("/content/search.php");

Output

/content

 

Post Your Comment

Next Questions
disk_free_space() function
disk_total_space() function
diskfreespace() function
feof() function
fflush() function
fgetc() function
fgetss() function
file_put_contents() function
fileatime() function
filectime() function
filemtime() function
fileowner() function
fileperms() function
filesize() function
filetype() function
flock() function
fputs() function
fscanf() function
fstat() function
ftell() function
ftruncate() function
is_executable() function
is_file() function
is_link() function
is_readable() function

Copyright ©2022 coderraj.com. All Rights Reserved.