PHP
This site does uses PHP mainly to include repeating HTML and to count the number of photos in each country or region.
PHP examples
Includes
<?php include("folder_nav_portfolio.htm"); ?>
Photo count
<?php
$mydir = basename(getcwd());
$directory = "/lib/images/travels/$mydir/";
if (glob("$directory*.jpg") != false)
{
$filecount = count(glob("$directory*.jpg"));
echo $filecount;
}
else
{
echo 0;
}
?>
My PHP
- bricadr.com — This stock site uses PHP to display financial data from Yahoo! Finance. PEAR Cache_Lite is used for data caching, and a cron job ensures the cache is updated during market hours.
- Guestbook using Tectite PHP FormMail
- Complex form using PHP FormMail and reCaptcha