Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

basename in php

Return filename from the specified path:

<?php
$path = "/testweb/home.php";

//Show filename
echo basename($path) ."<br/>";

//Show filename, but cut off file extension for ".php" files
echo basename($path,".php");
?>
 
PREVIOUS NEXT
Tagged: #basename #php
ADD COMMENT
Topic
Name
1+9 =