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

Answer Posted / hitha

$file_path=$_SERVER["SCRIPT_NAME"];

$break=explode('/',$file_path);

$file_name=$break[count($break)-1];

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is mysqli_fetch_array?

523


Tell me is it possible to remove the html tags from data?

532


What is data structure in php?

507


What is the advantage of runtime polymorphism?

509


What is mod_php?

565






Where to put php files in apache server?

507


Do I need apache for php?

622


How to call php function in jquery?

552


What is x+ mode in fopen() used for?

561


Whether php supports microsoft sql server?

561


Is gender a dependent variable?

512


Describe the security vulnerability of PHP?

611


List some features of php that are deprecated in php

511


Explain me soundex() and metaphone()?

549


Where are cookies stored php?

507