twofivethreetwo Posted November 15, 2007 Share Posted November 15, 2007 Here is the setup. You visit http://teamname.domain.com which redirects to www.domain.com/teamname I need to get the folder name (teamname) into a variable in php. How would I do this? not the full path or anything like that. Basically the folder name is the name that I need to get info from the sql database. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted November 15, 2007 Share Posted November 15, 2007 this should work.. *untested <?php echo trim(dirname($_SERVER['PHP_SELF']),"/"); ?> trim just removes the leading / but you could to it 101 other ways 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.