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
Tell me what is the actually used php version?
Does php class need constructor?
What is the main function of php?
Explain some of the php string functions?
Why do we use htaccess and where?
What is smarty?
What is use of in_array() function in php?
What is meant by session in php?
How is it possible to know the number of rows returned in result set?
How can you send email in php?
What is artisan in php?
Will php die?
What does php mean?
What's the output of the ucwords function in this example?
How to create a mysql connection?