Learning PHP. Have recursive directory loop issue

后端 未结 4 949
情歌与酒
情歌与酒 2021-01-28 18:32

So, I\'m familiar with Javascript, HTML, and Python. I have never learned PHP, and at the moment, I\'m banging my head against my desk trying to figure out what (to me) seems t

4条回答
  •  轮回少年
    2021-01-28 18:48

    Whew! Ok, I got everything working. DirectoryIterator was pissing me off with its random print order. So I fell back to just glob and scandir. Those seem to print out a list "logically". To summarize, this bit of php will grab folders of images and turn each folder into its own lightbox gallery. Each gallery shows up as a hyperlink that triggers the lightbox gallery. I'm pretty happy with it!

    So here's my final code:

    '.basename($folderItem).'' . "
    "; echo "
    " . "
    "; $count++; }else{ echo ''.basename($folderItem).'' . "
    "; } }echo "
    "; } } }

    Special thanks to Rasclatt for bearing with me through all of this and offering up a lot of hand-holding and help. I really appreciate it!

提交回复
热议问题