SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Motivated Procrastinator seriocomic's Avatar
    Join Date
    Jan 2003
    Location
    Outside the bubble
    Posts
    1,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $REQUEST_URI not returned?

    I am using PHP to make up part of a navigation script on my personal website www.seriocomic.com.

    Part of this navigation script uses the $REQUEST_URI variable to determine where the viewer is on the site. However, on one particular area of the site (imagery) there is no value returned so the navigation menu fails to indicate properly.

    The script uses
    PHP Code:
    if ( substr($urlname,1,4) == "imag" 
    to determine if the viewer is looking at the imagery part of the site. This works for the rest of the site, ie:
    PHP Code:
    if ( substr($urlname,1,4) == "rhet" 
    but not there - I'm stumped.

    Any help would be appreciated.

  2. #2
    ********* Member website's Avatar
    Join Date
    Oct 2002
    Location
    Iceland
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is $urlname copy of the $REQUEST_URI variable?

    Also you should use $_SERVER['REQUEST_URI'] instead of $REQUEST_URI if you have php 4.1 +

    Hope that helps
    - website

  3. #3
    Motivated Procrastinator seriocomic's Avatar
    Join Date
    Jan 2003
    Location
    Outside the bubble
    Posts
    1,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, I am using $urlname as the value.

    Thanks, the change to $_SERVER['REQUEST_URI'] fixed the problem.

    M.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •