Code Help Needed - modify script to only include .htm files
Posted: Tue Jun 28, 2005 9:32 am
Is there anyway to modify this script to only include certain file types? I only want to display .htm files.
Code: Select all
<?php exec("/bin/ls -t /home/yourwebsite/www/ | head -10",$s);
for ($i=0;$i < count($s);$i++)
echo "<a href=\"http://www.yourwebsite.com/$s[$i]\">$s[$i]</a><br>\n"; ?>