Jump to content

[SOLVED] PHP_SELF not return what i thought


Liquid Fire

Recommended Posts

I have this url

 

http://www.my-site.com/index.php/site/index

 

and on my localhost i get:

 

/index.php/site/index

 

but on my host server i get:

 

/index.php

 

is there a configuration that would cut the /site/index off of the PHP_SELF and is their a more reliable way of getting that?

 

I noticed that PATH_TRANSLATED, REQUEST_URI, REDIRECT_URL, have what i am looking for should i use one of those?

The issue is not removing the site/index, i need that information in order to properly process that request.  I though that php_self should have return the /site/index like is does on my localhost setup.  I guess I use request_url for the time being and hope it is consistent.

I did not try to come off as rude, you asked for code and I did not know what code to give you besides

 

echo $_SERVER['PHP_SELF'];

 

Now to what you said, I have that url but PHP_SELF is only '/index.php' on my live host server my localhost server has /index.php/site/index.  What would cause that variable to be different, a php setting maybe?

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.