note 71638 added to reserved.variables

From: Date: Sat, 09 Dec 2006 10:31:44 +0000
Subject: note 71638 added to reserved.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-120450@lists.php.net to get a copy of this message
IIS doesn't seem to have an equivalent to $_SERVER['DOCUMENT_ROOT'] and if you try manipulating $_SERVER['PATH_TRANSLATED'] then it won't work on APACHE (at least in my experience). For cross platform systems you could try including this code at the top of any pages that you will be needing the server root path: $server_root = str_replace( (substr($_SERVER['PHP_SELF'], 1)), "", $_SERVER['PATH_TRANSLATED'] ); //For IIS if ( $server_root == "" ) $server_root = $_SERVER['DOCUMENT_ROOT']; //For APACHE ---- Server IP: 83.138.144.80 Probable Submitter: 62.252.96.23 (proxied: 82.27.75.173) ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.php Edit -- https://master.php.net/note/edit/71638 Del: integrated -- https://master.php.net/note/delete/71638/integrated Del: useless -- https://master.php.net/note/delete/71638/useless Del: bad code -- https://master.php.net/note/delete/71638/bad+code Del: spam -- https://master.php.net/note/delete/71638/spam Del: non-english -- https://master.php.net/note/delete/71638/non-english Del: in docs -- https://master.php.net/note/delete/71638/in+docs Del: other reasons-- https://master.php.net/note/delete/71638 Reject -- https://master.php.net/note/reject/71638 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120450) next »