View Single Post
Old 11-07-2008, 10:48 AM   #5 (permalink)
Runar
The Contributor
 
Runar's Avatar
 
Join Date: Nov 2008
Location: Norway
Posts: 58
Thanks: 20
Runar is on a distinguished road
Default

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
}
    
?>
Send a message via MSN to Runar
Runar is offline  
Reply With Quote