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? Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/205372-parse-a-url/#findComment-1074796 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.