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 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 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.