How can I get the only name of the current executing file?
Answer Posted / sudeb mandal
<?php
//To get current file name.
$file = $_SERVER["SCRIPT_NAME"];
echo $file;
?>
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Do while loops php?
Who is the father of php?
Explain how can we execute a php script using command line?
What is input sanitization in php?
Where session is stored?
How long is session timeout?
Tell me what are magic methods?
Where can I learn php?
What language is similar to php?
What is trim function in php?
Will php die?
how retrive the video file in php using video tag
Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?
How to close a session properly?
Which function is used to read a single character from a file in PHP.