Answer Posted / nilsoft
Method 1.
$file = trim($_SERVER["SCRIPT_NAME"],'/');
Method 2.
$file =
substr($_SERVER["SCRIPT_NAME"],1,strlen($_SERVER["SCRIPT_NAME"])-1);
Method 3.
$file = str_replace('/','',$_SERVER["SCRIPT_NAME"]);
Method 4.
$file = basename($_SERVER["SCRIPT_NAME"]);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is dao in php?
How to download files from an external server with code in php?
Tell me what are the different types of errors in php?
Is laravel better than codeigniter?
Do you know design patterns. List few?
What is the difference between html and php?
How can you send http header to the client in php?
What is composer json?
List some array functions in php?
What are properties in php?
Write syntax to open a file in php?
Where are cookies stored php?
What are the 5 types of variables?
How cookies are transported from browsers to servers?
How can you retrieve data from the mysql database using php?