Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

which function used to get the file name in php?

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


Please Help Members By Posting Answers For Below Questions

Is python better than php?

1009


What is ltrim?

919


What is magic function in php?

1029


Can we override magic methods in php?

1012


Suppose your zend engine supports the mode Then how can you configure your php zend engine to support Mode ?

982


How is session id stored in browser?

1003


What is the main difference between require() and include()?

967


What is the meaning of xdebug?

969


How to Retrieve a Cookie Value?

1212


So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?

1044


Why do we need session?

969


What is overloading in php?

996


What do you mean range() in php?

1094


Which is better session or cookie?

960


What are the differences between GET and POST methods?

1077