error when reading from an image directory

images php coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
iso-latte-d
New php-forum User
New php-forum User
Posts: 14
Joined: Tue Jul 22, 2003 5:38 pm
Location: Melbourne, Australia

error when reading from an image directory

Postby iso-latte-d » Tue Aug 19, 2003 6:01 am

when i read from the 'images' directory, the script can display the file names inside the directory, but the next line displays "could not find file". anybody can help??


tia,


daniel


Code: Select all

$dir = "images/";
$handle = opendir($dir);

while (($file = readdir($handle)))
{
     if (($file!=".")&&($file!="..")&&($file!="thumbs.db"))   
     {
         echo "$file";
         if (!file_exists($file))
         {
            echo "Error: could not find file: $file.";
            exit();
         }
      .......
      }
.....//some other buggy code
}

User avatar
iso-latte-d
New php-forum User
New php-forum User
Posts: 14
Joined: Tue Jul 22, 2003 5:38 pm
Location: Melbourne, Australia

don't bother to reply cos i've solved it...

Postby iso-latte-d » Tue Aug 19, 2003 6:29 am

don't bother to reply cos i've solved it...
thanks


Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest

cron