Araknor Araknor - 1 year ago 116
Javascript Question

Uploading and displaying images

Right now I am coding an website that will be used to upload and download images. I have an function that will upload the files but I don't how how to read how many there are in the folder and how to execute the createElement for each. All help is welcome...

Answer Source

count images in your folder

$directory = '/var/www/ajaxform/';
$files = glob($directory . '*.jpg');

if ( $files !== false )
 $filecount = count( $files );
 echo $filecount;
 echo 0;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download