|
Posted by Jim Carlock on 10/03/07 20:49
On Oct 3, 1:27 pm, Gilles Ganault wrote:
> I've been googling for a couple of hours, but still haven't found
> what I need:
> - really simple PHP-based image gallery software.
Have you tried the glob() function?
http://us2.php.net/manual/en/function.glob.php
Or the opendir() function?
http://us2.php.net/manual/en/function.opendir.php
The example for the opendir() function:
<?php
$dir = "/etc/php5/";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
}
closedir($dh);
}
}
?>
which prints out:
filename: . : filetype: dir
filename: .. : filetype: dir
filename: apache : filetype: dir
filename: cgi : filetype: dir
filename: cli : filetype: dir
--
Jim Carlock
Swimming Pool, Spa And Water Feature Builders
http://www.aquaticcreationsnc.com/
Navigation:
[Reply to this message]
|