which function used to get the file name in php?

Answer Posted / naga

$parts = Explode('/', $_SERVER["SCRIPT_NAME"]);
$currentFile = $parts[count($parts) - 1];

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is php 5.6 secure?

530


What are constructor and destructor in PHP?

540


What is $_ files in php?

557


Explain mail function in PHP with syntax?

553


Why do you need php?

518






Which php global variable is used for uploading a file?

504


How to compare two strings with comparison operators in php?

528


What is the mysql injection?

545


Is nan in php?

526


Tell me what is the definition of a session?

548


What is use of count() function in php?

562


Is php fully object oriented?

481


Tell me how is the ternary conditional operator used in php?

565


How do you debug php?

554


What is difference between sql and php?

543