Jump to content

j0nr

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

j0nr's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ah got it! readdir() does not return the full path, so adding the path and results of readdir() to is_dir() made it work.... Why 'New Folder' showed up but none of the other folder will remain a mystery to me....
  2. Maybe I should add that this is currently running on Windows using XAMPP, but is to be uploaded to my Linux Server.
  3. Hi folks, First time posting here and a bit of a novice at PHP, but am learning.... I am fiddling with a small bit of code to create a very basic php gallery (I'm sure everyone has at some point). I started off with a mysql intergrated one then thought I would try a new one without the mysql. Its working fine but I am just having one very strange problem. Basically, I started of with just /mygallery/index.php?w=... where ... = the location (physical folder) of photos. I use opendir to open the contents of w= and parse whether it is a directory or a file (then narrow it down to just images). If it is a dir, then I present it as a link to that folder (sub-album) if it is a photo, I present a thumb link to the image. Now I have added a mod_rewrite rule to allow my urls to be of the form 'mygallery/album/subalbum' this gets ocnverted into 'mygallery/index.php?w=album/subalbum' Now the funny bit. If I create a new folder in one of the subalbum, e.g. : mygallery/album/subalbum/<b>New Folder</b> the code works. i.e. when I point my browser at 'mygallery/album/subalbum' I get a link showing 'New Folder' But if I create a new folder of any other NAME it does not appear in the list!! So if I just rename 'New Folder' to 'New Folde' it drops of the web page!!! Now I am really not sure what the hell is going on... Hope someone can help. I will post my code if necessary. Thanks in advance! Jon Reynolds
×
×
  • 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.