phpretard Posted June 21, 2010 Share Posted June 21, 2010 I need to parse a url. if the address is: http://www.mysite.com/services.php how can I put "services.php" into a variable? Help? Link to comment https://forums.phpfreaks.com/topic/205372-parse-a-url/ Share on other sites More sharing options...
Alex Posted June 21, 2010 Share Posted June 21, 2010 echo substr(parse_url('http://www.mysite.com/services.php', PHP_URL_PATH), 1); parse_url. Link to comment https://forums.phpfreaks.com/topic/205372-parse-a-url/#findComment-1074796 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.