Results 1 to 3 of 3

Thread: $_SERVER['REQUEST_URI'] not working :(

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default $_SERVER['REQUEST_URI'] not working :(

    has anyone tried out this ?

    it s weird with Hotaru, you nvr be able to get this info out, i.e.

    $result = $_SERVER['REQUEST_URI'];

    $result is always blank because $_SERVER['REQUEST_URI'] is not set.

  2. #2
    Member Jason's Avatar
    Join Date
    Jul 2009
    Location
    Nagoya, Aichi
    Posts
    74
    Thanks
    3
    Thanked 15 Times in 10 Posts

    Default

    This is odd ... are you running PHP in Windows or through IIS?

    If so, you'll need to replace $_SERVER['REQUEST_URI'] with a function like:

    PHP Code:
    function get_request_uri() {
       if (!empty(
    $_SERVER['REQUEST_URI'])) {
          return 
    $_SERVER['REQUEST_URI'];
       } else {
          
    $uri $_SERVER['SCRIPT_NAME'];
          if (!empty(
    $_SERVER['QUERY_STRING'])) {
             
    $uri .= '?'.$_SERVER['QUERY_STRING'];
          }
          
    $_SERVER['REQUEST_URI'] = $uri;
          return 
    $uri;
       }

    Hope this helps.

  3. #3
    Senior Member
    Join Date
    Jun 2011
    Location
    Thailand
    Posts
    294
    Thanks
    0
    Thanked 69 Times in 63 Posts

    Default

    Direct access to superglobals is disabled in Hotaru. You should use "cage" :

    $result = $h->cage->server->sanitizeTags('REQUEST_URI')

    The same is true for $_GET, $_POST, $_COOKIE, etc. For example to read $_GET['user'] :

    $h->cage->get->testUsername('user')
    Last edited by PuckRobin; 08-15-2011 at 11:51 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Borders not working in IE F************ IE
    By Moset in forum How-To and Troubleshooting
    Replies: 4
    Last Post: 09-23-2010, 10:16 PM
  2. Working @ Anywhere We need Twitter :)
    By jsinkeywest in forum Plugin Suggestion Box
    Replies: 0
    Last Post: 09-20-2010, 11:50 AM
  3. Log-In Not Working Suddenly
    By zigstonk in forum How-To and Troubleshooting
    Replies: 8
    Last Post: 07-10-2010, 07:38 AM
  4. not working
    By extremist in forum How-To and Troubleshooting
    Replies: 18
    Last Post: 05-17-2010, 02:54 AM

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
  •