Jump to content

Recommended Posts

Hi, I've come up with a good plan to work around my last includes problem, and it's flawless... with everything but the page I want to call. The page I'm trying to include is a php script for an image gallery I pulled off the net about a year ago. If anyone can help and they'd like to take a look at it, you're very welcome. Anyway...

When I call that particular page, I get 3 warning errors:

[quote]Warning: opendir(imgs/thumbs): failed to open dir: No such file or directory in /home/.../album.php on line 14

Warning: readdir(): supplied argument is not a valid Directory resource in /home/.../album.php on line 16

Warning: closedir(): supplied argument is not a valid Directory resource in /home/.../album.php on line 49[/quote]

Any ideas what this means and how to resolve this?
Link to comment
https://forums.phpfreaks.com/topic/14059-opendir-readdir-closedir-warnings/
Share on other sites

Well I thought that it might have been a problem with the directory, but it isn't because the page, album.php works fine if I view it directly, but it doesn't work if I call for it in the include.

The include basically says [i]$set .= "/album.php";[/i] with the link set as [i]index.php?set=directory[/i] ,so it calls ./directory/album.php, which should work. I'm just confused as to why it doesn't.
Lines 14, 16 and 49 all refer to '$myDirectory' and use it in [i]$myDirectory = opendir("imgs/thumbs");[/i], [i]while ($file = readdir($myDirectory))[/i] and [i]closedir($myDirectory);[/i] respectively. If you'd like to take a look, I'll attach album.php in a moment! :)

[attachment deleted by admin]
That's just an insult to my intelligence! ;) My directories are set up perfectly fine, otherwise they wouldn't work when I view the page directly. Do you think there's a chance that it's looking for the filepath ./album.php/imgs/thumbs? It's a bit daft, but I'm running out of ideas! ::)
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.