05-26-2008, 03:59 AM
|
#4 (permalink)
|
|
The Acquainted
Join Date: May 2008
Location: Québec
Posts: 104
Thanks: 10
|
Here is where I am now :
PHP Code:
<?php
$imgdir= $_GET['folder']; $imgdir.="/";
// dircont (string [directory path]) // Returns Array of filenames in the given directory. // Returns FALSE on error. function dircont($imgdir) { $dir_array = array(); if (false !== ($dir = opendir($imgdir))) { while (false !== ($file = readdir($dir))) { if ($file != '.' && $file != '..') {
$dir_array[] = $file; $contentArray[$file]['modifiedTime'] = filemtime($imgdir."".$file); $my_image = array_values(getimagesize($imgdir."".$file)); list($width, $height, $type, $attr) = $my_image; $widthArray[$file][filemtime($imgdir."".$file)]['orientation'] = $height; } } return $widthArray; }
}
// To print.. // $path = "/home/helpelf/helpelf-www/"; echo "<pre>"; print_r(dircont($imgdir)); echo "</pre>";
?>
__________________
That's why we are not alone on earth... let's build !
|
|
|
|