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

Forum statistics

Threads
426,785
Messages
7,185,945
Members
179,140
Latest member
xoso333life

Most viewed of week

Most viewed of week

Back
Top Bottom