[SOLVED] !isset is not working....!?
Posted: Fri Dec 17, 2004 3:44 am
Hi all,
For some reason this piece of code does not execute.
I placed an echo inside the statement test if the statement was run, and it didn't. So I placed an echo just after the statement and echoed out the $_server['Request_URI'], nothing was output. Which I found odd because then my aboive statement should have run.
Anyway, I changed the statement above to:
This then ran! I have no idea why this run and the original did not!?
Could someone enlighten me.
I run IIS on a win 2003 server.
Jim
For some reason this piece of code does not execute.
Code: Select all
<?php
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].'?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '');
}
?>Anyway, I changed the statement above to:
Code: Select all
<?php
if ($_SERVER['REQUEST_URI'] == '') {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].'?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '');
}
?>Could someone enlighten me.
I run IIS on a win 2003 server.
Jim