Re: HTTP_USER_AGENT?
| From: | George Hester | Date: | Thu, 11 Jul 2002 03:41:08 +0000 |
| Subject: | Re: HTTP_USER_AGENT? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107005@lists.php.net to get a copy of this message | ||
Thanks that worked just fine. But now I am irritated as hell. Obviously there
is no backwards compatibility with new releases. Does this mean if I install a
new version of PHP then all books published before that date are worthless?
Seems so.
For example in a book discussing PHP 3 it says:
<?
phpinfo();
?>
This works just fine. In a book that discusses PHP 4 it says:
<?
php_info()
?>
This gives "Fatal error: Call to undefined function: php_info() in
c:\inetpub\wwwroot\php\phpinfo.php on line 2."
So it's not just backwards compatibility it is careless planning. This is not
good. I will have to search hi and lo to determine if a failure is due to
incorrect syntax because of version and not just careless typing on my part.
I remember when FORTRAN was being developed we were assurred that all previous
commands from older versions would continue operative in the new. FORTRAN 77
to FORTRAN 90. I think the developers of PHP ought to consider why the
developers of FORTRAN thought that might be a good thing to do. It is still
used to this day. Write a FORTRAN 77 prog and it will compile and run on a
FORTRAN 90 compiler out of the box. Thanks again.
--
George Hester
_________________________________
"Justin French" <justin@indent.com.au> wrote in message
news:B9532D6D.A2C5%justin@indent.com.au...
> Try:
>
> <? echo $_SERVER['HTTP_USER_AGENT']; ?>
>
> ... you might have a newer version of PHP (4.1+), which uses the global
> arrays like:
>
> $_SERVER
> $_POST
> $_GET
> $_SESSION
> $_COOKIE
>
> ...
>
>
> Justin French
>
>
>
>
> on 11/07/02 12:32 PM, George Hester (hesterloli@hotmail.com) wrote:
>
> > I have this in my web site not in an executable folder:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>My First PHP Program</TITLE>
> > </HEAD>
> > <BODY>
> > <?php echo "Hello World!"; ?>
> > </BODY>
> > </HTML>
> >
> > No problem. I then put this in the same folder:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>My Second PHP Program</TITLE>
> > </HEAD>
> > <BODY>
> > <?php echo $HTTP_USER_AGENT; ?>
> > </BODY>
> > </HTML>
> >
> > Nothing appears. What's wrong?
> >
> >
> > --
> > George Hester
> > _________________________________
> >
> >
>