Jump to content

$_SERVER help


tcorbeil

Recommended Posts

Me again...

 

is there a way to get just the url?

 

for instance if I have an address such as Domain Name/Oilers/oilers.html

 

in every instance I do $path = $_SERVER['SCRIPT_NAME']; I get /Oilers/oilers.html

 

If i just want /Oilers/ with the file running name at the end, how would I go about?

 

Thanks.

T.

Link to comment
Share on other sites

Thanks Frost.

 

I tried print_r($_SERVER); and seen all of the info.. none of the switch variable would give the path without the file running at the end.. can you elaborated on the split idea? Could I also not use a rtrim up until the first '/' it encounters?

 

Thanks. T

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.