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
How to check an key is exists in array?
What are different types of Print Functions available in PHP?
What is the difference between file_get_contents() and file_put_contents() in php?
What is the difference between get and post method in php?
How do we get the current session id?
How do you trim spaces in excel?
Which function is used in php to count the total number of rows returned by any query?
Can a super () and this () keywords be in same constructor?
Can we extend two classes in php?
Is php the same as html?
How to download file in php?
What is magic function in php?
What is in php 7?
What is meant by variable variables in php?
What are the advantages of oops in php?