December 2002
Intermediate to advanced
496 pages
9h 40m
English
We’ll start with two quick examples. Create a new directory for PHP work and cd into it:
$ mkdir /var/www/html/php $ chmod a+rx /var/www/html/php $ cd /var/www/html/php
Create a PHP file named hello.php: [4]
[4] Remember the permissions, 644.
<html> <head> <title>Hello, world! with PHP</title> </head> <body bgcolor="#ffffff"> <? echo "hello, world!" ?> </body> </html>
To view the result of this file, load either one of these URLs: http://localhost/php/hello.php or www.opensourcewebbook.com/php/hello.php. The result can be seen in Figure 12.1.

The PHP code is embedded in ...
Read now
Unlock full access