11-07-2008, 10:48 AM
|
#5 (permalink)
|
|
The Contributor
Join Date: Nov 2008
Location: Norway
Posts: 58
Thanks: 20
|
Like this? The code below is tested with positive result.
PHP Code:
<?php
// Turn on error reporting ini_set( 'display_errors', 'yes' );
// Set path to our directory (for easier use) // Remember the last slash (/)! $directory_path = 'your/image/folder/';
// Return .png files found in the directory foreach( glob( $directory_path . '*.png' ) as $file ) { // Put data in variables $filename = basename( $file ); $filesize = filesize( $file ); // Do your database magic here } ?>
|
|
|