Click to See Complete Forum and Search --> : PHP help!!


Anon
05-21-2002, 01:15 PM
I just installed the Apache and PHP, and IE can display the .php file which includes the sentence" <? php phpinfo(); ?>. Also it can display the .php file which includes " <?php echo "Hello World<p>"; ?> ".

The problem is IE displays nothing if the .php file include following sentence:
<?php echo $HTTP_USER_AGENT; ?>

Anyone know how to solve it?

Thanks very much.

Anon
05-21-2002, 10:05 PM
Hmm, try this instead (you probably have register_globals turned off):

<?php
echo $GLOBALS['HTTP_USER_AGENT'];
?>

Anon
05-25-2002, 06:14 AM
NO!!!!! it's wrong!

$_SERVER["HTTP_USER_AGENT"]

p.s. register_globals = Off (php.ini)