Page 1 of 1
$_SERVER['REQUEST_URI']; prblem [SOLVED]
Posted: Mon Jun 26, 2006 7:57 am
by itsmani1
i am using windows and i iIIS and tried executing :
Code: Select all
echo $_SERVER['REQUEST_URI'];
exit;
but its not woring. waht's the problem.
Posted: Mon Jun 26, 2006 8:14 am
by JayBird
Not working in what way?
Posted: Mon Jun 26, 2006 8:30 am
by itsmani1
its not giving me output
Posted: Mon Jun 26, 2006 8:34 am
by JayBird
The variable isn't always present in certain setups, you could do something like this
Code: Select all
if(!isset($_SERVER['REQUEST_URI'])) {
$arr = explode("/", $_SERVER['PHP_SELF']);
$_SERVER['REQUEST_URI'] = "/" . $arr[count($arr)-1];
if ($_SERVER['argv'][0]!="")
$_SERVER['REQUEST_URI'] .= "?" . $_SERVER['argv'][0];
}
EDIT: i changed the script
Posted: Tue Jun 27, 2006 1:12 am
by itsmani1
Basically i want to find current working directory using this.
Posted: Tue Jun 27, 2006 1:14 am
by RobertGonzalez
itsmani1 wrote:Basically i want to find current working directory using this.
getcwd()
Posted: Tue Jun 27, 2006 1:28 am
by itsmani1
ok, i have managed to done it.
Posted: Tue Jun 27, 2006 1:50 am
by RobertGonzalez
So what did you do? And can you edit your original post title and add [SOLVED] to the beginning of it? Thanks.