PHP $_SERVER/'PHP_SELF' Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ziycon
    Contributor
    • Sep 2008
    • 384

    PHP $_SERVER/'PHP_SELF' Issue

    I have a language switcher on the site I'm working on and its working fine except for one little thing. I'm using mod_rewrite to change all .php extensions to .html to hide the .php extension. When I go to change a language I need to get the current page im on so once the language is changed I will be redirected back to the page I was on. I'm currently using 'PHP_SELF' but it takes the name of the file and not the name like index.html which I want it to.

    Any ideas?
  • zorgi
    Recognized Expert Contributor
    • Mar 2008
    • 431

    #2
    can you use substr_replace

    Comment

    • ziycon
      Contributor
      • Sep 2008
      • 384

      #3
      Used str_replace. Thanks for the help.

      Comment

      Working...