b1011 Posted June 17, 2007 Share Posted June 17, 2007 what function returns the name of the current php file? ??? thanks if you help Link to comment https://forums.phpfreaks.com/topic/55898-solved-getting-the-php-file-name/ Share on other sites More sharing options...
AndyB Posted June 17, 2007 Share Posted June 17, 2007 $_SERVER['SCRIPT_NAME'] Link to comment https://forums.phpfreaks.com/topic/55898-solved-getting-the-php-file-name/#findComment-276114 Share on other sites More sharing options...
b1011 Posted June 17, 2007 Author Share Posted June 17, 2007 thanks, but i guess it didnt work im trying to make a "hidden" dynamic image i can use for a forum. http://revelgames.byethost7.com/gmmessengerstatus.php/brad.png?user=brad i was hoping that that would return brad.png, instead of gmmessengerstatus.php Link to comment https://forums.phpfreaks.com/topic/55898-solved-getting-the-php-file-name/#findComment-276115 Share on other sites More sharing options...
The Little Guy Posted June 17, 2007 Share Posted June 17, 2007 What will this image do? Link to comment https://forums.phpfreaks.com/topic/55898-solved-getting-the-php-file-name/#findComment-276116 Share on other sites More sharing options...
b1011 Posted June 17, 2007 Author Share Posted June 17, 2007 shows online status from a mysql database basically i need to fin the end of the url. meaning from http://revelgames.byethost7.com/gmmessengerstatus.php/brad.png i need to call after the last / you know what i mean? Link to comment https://forums.phpfreaks.com/topic/55898-solved-getting-the-php-file-name/#findComment-276117 Share on other sites More sharing options...
AndyB Posted June 17, 2007 Share Posted June 17, 2007 <?php $url = "http://revelgames.byethost7.com/gmmessengerstatus.php/brad.png"; // example $parts = explode("php/",$url); echo $parts[1]; // brad.png ?> Link to comment https://forums.phpfreaks.com/topic/55898-solved-getting-the-php-file-name/#findComment-276214 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.