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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.