How can I get the only name of the current executing file?

Answer Posted / bhawani

$name=basename($_SERVER['PHP_SELF']);

echo $name;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does a special set of tags do in php?

550


Tell us how can we access the data sent through the url with the post method?

521


What is the role of php.ini file?

549


Why php is sometimes called as embedded scripting language?

487


What is polymorphism php?

502






What u mean by query?

486


Tell me what does the array operator '===' means?

531


I am writing an application in php that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with php?

516


Explain how you can update memcached when you make changes to php?

564


How to make a class in php?

545


Which php framework is best?

542


Explain what is the function file_get_contents() usefull for?

513


Is rent a variable cost?

558


Explain what does the function get_magic_quotes_gpc() means?

519


How to Pass JSON Data in a URL using CURL in PHP?

568