image display problem php

This is the code I have and I am wondering where do I insert my image path. I need the image shown to be taken from a specific folder but this code only allows php to look in my root folder. Can anyone help? Where should I insert the name of my images folder?

<?php $images = glob('*.{gif,png,jpg,jpeg}', GLOB_BRACE); $num_of_files = 4; foreach($images as $image) { $num_of_files--; if($num_of_files > -1) echo "".$image."
Created on ".date('D, d M y H:i:s', filemtime($image)) ."


" ; //display images else break; }?>

well right here it is already showing an image path:
[php]
<img src="."/images".$image."’".">
[/php]
right where it says /images that is the folder that it should go in, I am not certain what you have in the variable:
[php]
$image
[/php]
but it looks like you might be missing one of the slashes so you want to change
[php]

<img src="."/images".$image."’".">[/php]
to something like:
[php]<img src="."/images/".$image."’".">[/php]
but images is definitely the folder where this script is pulling the images from and if you want to change that then there is your spot :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service