[eluser]Captain_Fluffy_Pants[/eluser]
so for the image uploading and send to a view i created this code for the view
Code:
<?php
$dirFiles = array();
// opens images folder
if ($handle = opendir('/home/lulzlab/public_html/uploads')) {
while (false !== ($file = readdir($handle))) {
// strips files extensions
$crap = array(".jpg", ".jpeg", ".JPG", ".JPEG", ".png", ".PNG", ".gif", ".GIF", ".bmp", ".BMP", "_", "-");
$newstring = str_replace($crap, " ", $file );
//asort($file, SORT_NUMERIC); - doesnt work :(
// hides folders, writes out ul of images and thumbnails from two folders
if ($file != "." && $file != ".." && $file != "index.php" && $file != "Uploads") {
$dirFiles[] = $file;
}
}
closedir($handle);
}
sort($dirFiles);
foreach($dirFiles as $file)
{
echo "<li><a ><img ></li>\n";
}
?>
this is what it turned out to look like so it almost worked
http://i.imgur.com/e5RHy.png can someone please help me :c ?