puremourning
09-30-2001, 10:07 AM
does anyone know how to get things like the requested page in a 404 in PHP, kinda like the asperror component does in ASP?
thanks
Ben
thanks
Ben
|
Click to See Complete Forum and Search --> : custom errors in IIS 5 puremourning 09-30-2001, 10:07 AM does anyone know how to get things like the requested page in a 404 in PHP, kinda like the asperror component does in ASP? thanks Ben pure_mourning 09-30-2001, 02:56 PM FYI: i have solved this to an extent, if anyone else needs to know: in the 404 page have this: $qs = explode(";", $HTTP_SERVER_VARS['QUERY_STRING']); //for IIS only $qs[1] = str_replace("http://{$HTTP_SERVER_VARS['HTTP_HOST']}", "", $qs[1]); //cut out the server bit $qs[0] will contain the error code (ie 404) $qs[1] will give you the relative path (to the root) of the requested document i hope this is helpful :-/ PS, if anyone has a better solution... PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved. |