Here’s a quick tip: I’ve an absolute file path “/var/www/html/index.php”, but I need only the file name – index.php. So how do I get it?
basename
There it is:
$filename = basename('/var/www/html/index.php'); |
now $filename contains only “index.php”!
Here’s a quick tip: I’ve an absolute file path “/var/www/html/index.php”, but I need only the file name – index.php. So how do I get it?
There it is:
$filename = basename('/var/www/html/index.php'); |
now $filename contains only “index.php”!