which function used to get the file name in php?

Answer Posted / lakshmi

<?php
$path = "/home/httpd/html/index.php";
$file = basename($path);
$file = basename($path, ".php");
?>

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is singleton class in php?

536


What are php magic methods?

521


Which are the best start and end tags to use?

578


How do I run a php script in windows?

553


How to get the value of current session id?

536






how to use http headers inside php? Write the statement through which it can be added?

507


What is php good for?

509


Is facebook still written in php?

553


Does php pass arrays by reference?

570


What do you use php for?

530


What are getters and setters and why are they important?

531


Explain the types of functions for Splitting String?

568


What is get and post method in php?

523


Why do we use query?

502


How to process the uploaded files?

586