Re: program first.php
The program works fine when I enter the URL as: http://localhost/first.php
exactly as shown in Fig.A on Pg.4. So far, so good!
However, when I open the file using my local path:
file:///Applications/MAMP/htdocs/Ch01/first.php
it does not execute the HTML, but displays the source code of first.php, but with the <?php ?> tag removed!
Fig.B on Pg.5, shows the HTML executing normally (because there is no actual PHP code between the PHP tags). You even say "not that this particular script is affected either way."
Of course, if I change the name of the file from first.php to first.html, then it works as a normal HTML program, but Fig.B shows the name as first.php
Shouldn't your browser fail to run a local file with a .php extension?
Any idea what is going on here?