NetworkTown.Net
Account Closed
- Impact
- 2
Hi
I have made a image host script i want to make a admincp now so in the admincp i need help i want to know how i can do this:
List all images in the directory (in a 250 * 200 box or something in a list)
Then at the side of the images put a link so i can delte a image, i know it would use unlink or something but i can't figure out how to do it, iv got this so far;
And also i had this from sitepoint but did not understand any one: http://www.sitepoint.com/forums/showthread.php?t=367792
Thanks.
I have made a image host script i want to make a admincp now so in the admincp i need help i want to know how i can do this:
List all images in the directory (in a 250 * 200 box or something in a list)
Then at the side of the images put a link so i can delte a image, i know it would use unlink or something but i can't figure out how to do it, iv got this so far;
PHP:
<?
$read = '../DirPathNameHere/';
$myDirectory = opendir($read);
while($entryName = readdir($myDirectory))
{
if (strtolower(substr($entryName, -3)) == "jpg")
{
$dirArray[]=$entryName;
echo $entryName.'<br />';
echo '<TABLE width=500 align=center BGCOLOR=#CCCCCC>';
echo '<TR><TD align=center valign=center>';
echo '<img src=' .$read.$entryName. '><BR>';
echo '</TD></TR>';
echo '</TABLE>';
}
}
closedir($myDirectory);
?>
And also i had this from sitepoint but did not understand any one: http://www.sitepoint.com/forums/showthread.php?t=367792
Thanks.





