PHP:
$imgdir = $_GET['show'] ;
$page = $_GET['page'];
$a_img = array();
if ($imgdir =="")
{$imgdir = $dname[0];
}
$dimg = opendir($imgdir);
while($imgfile = readdir($dimg))
{
if( (substr($imgfile,-3)=="gif") || (substr($imgfile,-3)=="jpg") || (substr($imgfile,-3)=="JPG") || (substr($imgfile,-3)=="GIF") )
{
$a_img[count($a_img)] = $imgfile;
sort($a_img);
reset ($a_img);
}
}
Code trên lỗi sao mà cứ báo thế này, xin giúp đỡ, thanks!
Code:
Warning: readdir() expects parameter 1 to be resource, boolean given in /home