The end echo statement is just so I can see whether it’s populating the array or not. There is another loop statement to display the images, which I believe is fine. I just can’t get my head around why this doesn’t seem to be working.
Umm… the first line is a $tempDir allocation, so that should be fine.
I’m guessing it doesn’t succeed, as the array count is always 0. If I change $tempDir to a set path in a static site, the whole thing works fine. I think its the mixing of the template_url and relative path into a variable and then calling that variable that’s causing the issue, but I’m not certain.
Had played around with glob() in the past, but once I got this working with opendir(), I moved on. Might have to go back and revisit.
> the first line is a $tempDir allocation, so that should be fine.
“should be,” sure. But you need to check. That function might be failing – you have no way to know unless you check.
> Replacing get_bloginfo(‘template_url’) with TEMPLATEPATH fixes the issue.
As a side note, you should avoid using URLs to access stuff on your own host. There’s no reason to open your front door, walk around the house, and come in through the back door just to get from the living room to your kitchen, right?
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".