Click here to Skip to main content
15,899,634 members

Comments by saifullahiit (Top 88 by date)

saifullahiit 19-Aug-15 14:39pm View    
can you please tell me how to show images from the current directory
saifullahiit 19-Aug-15 14:24pm View    
i have optimized my code:
$files = glob(__DIR__.DIRECTORY_SEPARATOR.'*.jpg');
echo $files;
foreach ($files as $file) {
if (!is_file($file)) { // if isn't file, skip it

continue;

}

$info = pathinfo($file);
// check if allowed extensions
if (in_array(strtolower($info['extension']), array('jpg', 'png', 'gif'))) {
echo '<img src="'.$file. '" alt="'.$file. '" />'; // your image echo
}
}
but here images are broken. you can check the link.
saifullahiit 17-Aug-15 3:42am View    
when you debug the code , you never enter in, " if (chk.Checked) { }" loop ???
yes you are right
saifullahiit 16-Aug-15 5:08am View    
the entire code is above please read it carefully
saifullahiit 16-Aug-15 1:12am View    
no. 1. enter web page link in text box and hit load button
2. then it loads images in grid view.