Help - Lỗi PHP

thuannv

Junior
Joined
Jul 6, 2013
Messages
353
Reactions
27
MR
0.002
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
 

Announcements

Today's birthdays

Forum statistics

Threads
426,803
Messages
7,186,419
Members
179,153
Latest member
soicunmiu

Most viewed of week

Most viewed of week

Back
Top Bottom