unsider Posted March 14, 2008 Share Posted March 14, 2008 K, let's assume that i am currently using example.com/main/index.php as my index page. If I call $_SERVER['PHP_SELF'] It returns example.com/main/index.php/..... correct? Well is it possible to load just example.com/ as opposed to the full filepath from this? Is so, how? Quote Link to comment Share on other sites More sharing options...
Stooney Posted March 14, 2008 Share Posted March 14, 2008 try $_SERVER['HTTP_HOST'] Quote Link to comment Share on other sites More sharing options...
unsider Posted March 14, 2008 Author Share Posted March 14, 2008 Hmm, that simple? I suppose I expected something more. Maybe I should go do some more reading. Quote Link to comment Share on other sites More sharing options...
unsider Posted March 14, 2008 Author Share Posted March 14, 2008 Ran into a problem. About to go read up on it, but I figure I can do two things at once. $self = $_SERVER['HTTP_HOST']; echo '<a href="$self\star_rating.php">Star Rating</a>'; URL Output: http://example.com/main/$self/index.php Quote Link to comment Share on other sites More sharing options...
unsider Posted March 14, 2008 Author Share Posted March 14, 2008 Still haven't found anything. Bump. Quote Link to comment Share on other sites More sharing options...
derrick1123 Posted March 14, 2008 Share Posted March 14, 2008 IS: echo '<a href="$self\star_rating.php">Star Rating</a>'; Needs to be: echo "<a href='$self\star_rating.php'>Star Rating</a>"; Quote Link to comment Share on other sites More sharing options...
unsider Posted March 14, 2008 Author Share Posted March 14, 2008 Thank you very much. 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.