Jump to content

[SOLVED] $_SERVER help (I think)


LemonInflux

Recommended Posts

I'm currently working on a project that can easily be integrated into a website. The way I'm doing this is as follows:

 

I'm (trying to) get the path to the page I'm using, so when you go to a different page, I can do:

 

*Current_file_path*?randomthing=value, or whatever. So, I can build URLs like:

 

site.com/index.php?page=article&comment=true&id=90&lite=false

 

The only problem I'm having is getting the path.

 

I looked at SCRIPT_FILENAME, but that gives the absolute (e:\domains\s\site.com/index.php or whatever), which presumably wouldn't work. So, what I'm basically asking is, would this work, or is there another way to do this?

Link to comment
https://forums.phpfreaks.com/topic/79605-solved-_server-help-i-think/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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