Liquid Fire Posted January 29, 2008 Share Posted January 29, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/ Share on other sites More sharing options...
revraz Posted January 29, 2008 Share Posted January 29, 2008 It will return the page that it's running. Where is that located? Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451818 Share on other sites More sharing options...
valtido Posted January 29, 2008 Share Posted January 29, 2008 that is very odd loool are you sure you tried $_server['php_self'] ?????? otherwise you can log preg replace to remove the site/index loool ps Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451821 Share on other sites More sharing options...
Liquid Fire Posted January 29, 2008 Author Share Posted January 29, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451830 Share on other sites More sharing options...
valtido Posted January 29, 2008 Share Posted January 29, 2008 post a small sample mate may we can help that way coz its a bit confusing at the moment PS Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451838 Share on other sites More sharing options...
Liquid Fire Posted January 29, 2008 Author Share Posted January 29, 2008 um... since my question is should php_self return the site/index when the url is www.domain.com/index.php/site/index I don't see what code you need to see to understand it. what kinda code would help you understand? Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451872 Share on other sites More sharing options...
valtido Posted January 29, 2008 Share Posted January 29, 2008 no need for rudeness lool just trying to help. and if you are to enter www.domain.com/index.php/site/index then the php_self would be = 'index.php/site/index' so i would say yes loool as far as i can understand you PS hope it helps Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451878 Share on other sites More sharing options...
Liquid Fire Posted January 29, 2008 Author Share Posted January 29, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451897 Share on other sites More sharing options...
valtido Posted January 29, 2008 Share Posted January 29, 2008 maybe there is a server preventing certain outcomes. PERL or PHP or htaccess. im not that familiar with them all loool more of a programmer than enginier hahha if that makes sense research on google n maybe u'll get somin lool god knows Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451902 Share on other sites More sharing options...
Liquid Fire Posted January 29, 2008 Author Share Posted January 29, 2008 yea maybe. I will stick with $_SERVER['REQUEST_URI'] untill that fails out. Thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/88296-solved-php_self-not-return-what-i-thought/#findComment-451916 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.