Home Tutorial Php Examples basename() example

 
 

basename() example
Posted on: July 30, 2009 at 12:00 AM
Advertisement
Here you will learn the example of basename().

basename()

The function basename () is used for printing the basename of the file, e.g.

<?php
$name = "c:/wamp/www/dest.txt";
echo basename($name) ."<br/>";
echo basename($name,".txt");
?>

The output of this example will print both the base name of the file with extension and basename without extension.

Advertisement

Related Tags for basename() example:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 30, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com