Araknor Araknor - 3 months ago 7x
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...


count images in your folder

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

if ( $files !== false )
 $filecount = count( $files );
 echo $filecount;
 echo 0;