Menu

$_SERVER[‘REQUEST_URI’] not working IIS

Written by

Undefined index: REQUEST_URI Windows Server IIS for PHP

if (!isset($_SERVER['REQUEST_URI']))
{
       $_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'],1 );
       if (isset($_SERVER['QUERY_STRING'])) { $_SERVER['REQUEST_URI'].='/'.$_SERVER['QUERY_STRING']; }
}

 

 

Article Categories:
IIS/Windows Server · PHP

Leave a Reply

Your email address will not be published. Required fields are marked *

Shares