Jump to content

[SOLVED] image page


Sir Softsand

Recommended Posts

just in cas there is a problem again here is glob(). You can save this in your image file and then use require() in what ever file you want it to appear in. That way you dont have to mess around with folder structures etc.

 

<?php

$array = glob("*.gif"); // Replace .gif with whatever file extension you use
foreach ($array as $val)
{
echo ("<img src=\"".$val."\" name=\"".$val."\" id=\"".$val."\" alt=\"".$val."\" />");
}

?>

 

I think that should work  ;D

 

~ Chocopi

It really doesn't matter how you acquire the list of images; readdir and glob are just two different methods that can both produce identical results.  If the images are present in the folder, they'll appear.

 

There's no such thing as a piece of script that works some of the time under identical conditions.  Best guess is that you have crappy hosting or some severe caching issues with your internet service provider.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.