Thanks in advance for any help out there…
I wrote this code so it displays images in a directory. The issue is with the new server running PHP as an Apache 2.0 Handler module it is not showing the files in proper time order… Using PHP Version 5.3.2-1 ubuntu4.17
This is the order it displays the files now:
FileName: http://www.domain1.com/articles/images/2014/HOUSE_layout.jpg
Size: 9.92 Kb
Date Created: Sat Jun 14, 2014 11:40:am
FileName: http://www.domain1.com/articles/images/2014/photo 4.JPG
Size: 731.28 Kb
Date Created: Sat Jun 14, 2014 11:46:am
FileName: http://www.domain1.com/articles/images/2014/photo 5.JPG
Size: 715.89 Kb
Date Created: Sat Jun 14, 2014 11:45:am
FileName: http://www.domain1.com/articles/images/2014/photo (2).JPG
Size: 108.74 Kb
Date Created: Sat Jun 14, 2014 11:41:am
FileName: http://www.domain1.com/articles/images/2014/photo 2.JPG
Size: 118.50 Kb
Date Created: Sat Jun 14, 2014 11:46:am
FileName: http://www.domain1.com/articles/images/2014/mega_milk.jpg
Size: 40.82 Kb
Date Created: Sat Jun 14, 2014 11:40:am
This is my code… It use to work great… Not sure why it is not displaying the files in order anymore?
[php] Current Directory Contain the
Following Images…
(Highlight the image link and ‘Copy & Paste’ - You want to select FROM < to >)
<?php
$dir = new DirectoryIterator( ‘/var/www/vhosts/domain1.com/httpdocs/articles/images/2014’ );
foreach($dir as $file )
{
if(!$file->isDot() && !$file->isDir()) {
echo “<font size=“2” face=“Verdana”>”;
echo “FileName: <font color=”#990000">http://www.domain1.com/articles/images/2014/".$file->getFilename()."
";
echo “Size: “.number_format(($file->getSize()/1024),2).” Kb
”;
echo “Date Created: “.date(“D M d, Y h:i:a”,$file->getCTime()).”
”;
echo “”;
}
}
?>[/php]
AGAIN!!! Thanks for any help…