basename () Get file name
Code
$path = ' c:\a\b\index.html ';
Echo basename ($path);
Output results
Index.html
DirName () Get File path
Code
$path = ' C:\AppServ\www\Basic6\Demo1.php ';
echo ' path: '. dirname ($path);
Output results
Path:C:\AppServ\www\Basic6
PathInfo () Get file specific information, including: directory name, base name, and extension
Code
$path = ' C:\AppServ\www\Basic6\Demo1.php ';
$array _path =pathinfo ($path);
Print_r ($array _path);
Output results
Array ([dirname] = C:\AppServ\www\Basic6 [basename] = demo1.php [extension] = php [filename] + Demo1)
Realpath () Get file absolute path
Code
$path = ' 2.php ';
echo Realpath ($path);
Output results
D:\wamp\www\php\2.php
FileSize () Get File size
Disk_free_space () Get Disk free space
Disk_total_space () Get total disk space
Fileatime () Determining the last access time for a file
basename () directory and file-related operations