[icoSystem.png]Sitemap
[icoDocs.png]Documents
[icoFolderApps.png]Program files
[icoFolderWin.png]Windows
[icoDocs.png] Documents[icoFolderPHP.png] PHP files
[icoFolderPHP.png]
 PHP files (5jan2010)
Some examples playing with PHP.
 basic.php
<?php /** * A comment: put here some info * * @version 0.1 * @author me * @license modify freely */ // This is a variable defined by me $title = "A basic PHP example"; // Print html header echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\""; echo " \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">"; echo "<head><title>".$title."</title></head>"; echo "<body>"; ?> <!-- A php script region is a processing instruction --> <h1><?php echo $title; ?></h1> <p> This is a transformation of page &quot; <?php echo basename($_SERVER['PHP_SELF']); ?> &quot; done at <?php echo date('H:i - d M Y'); ?> </p> <p> You are connecting from <?php echo gethostbyaddr($_SERVER['REMOTE_ADDR']); ?> </p> <?php echo "<p>An iteration example:"; $i = 0; while ( $i < 10 ) echo " i= ".++$i; echo "</p>"; ?> <!-- Outside scripts you can put hard coded html --> </body></html>

Recommended tools:


See also
[php]PHP