Re: php tutorial scripts, feedback
| From: | Gabor Hojtsy | Date: | Wed, 12 Jun 2002 20:49:47 +0000 |
| Subject: | Re: php tutorial scripts, feedback | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-10807@lists.php.net to get a copy of this message | ||
AFAIK those are real spaces in the source? Can you reproduce the same
problem with other examples from that page, or from anywhere else from
the manual?
Goba [one webmaster@php.net]
----- Original Message -----
From: <lconnolly@myrealbox.com>
To: <webmaster@php.net>
Sent: Wednesday, June 12, 2002 5:11 PM
Subject: php tutorial scripts, feedback
> Please update your tutorial to notify users that copy-paste of sample
scripts will produce an error according to this newsgroup article, which
helped me discover the problem after hours of other troubleshooting:
>
> It is an extremely baffling problem, not least because this code is on
> the basic PHP tutorial at www.php.net/tut.php. The exact copied code is
this: <html><head><title>PHP Test</title></head>
> <body>
> <?php echo "Hello World<p>"; ?>
> </body></html> Looks fine eh? Well, no, it isn't. Copy the code (from the
webpage,
> not here) and examine the hex. For the problem part (' echo '), the
> hex is: A0 65 63 68 6F A0 Which causes a problem, since the A0's are _not_
spaces, but some
> other ASCII character (shown in most typesets as ' ' or 'á'). So what
> PHP is actually parsing is this: <html><head><title>PHP
Test</title></head>
> <body>
> <?phpáechoá"Hello World<p>";á?>
> </body></html> Which is obviously horribly broken. Re-type the spaces and
all should
> be well.
>