That PHP should be in a root directory with a subdirectory named "banners." Maybe the folder tree is funky? Or maybe you need to modify the echo code for where you are putting it? The code I made displays this and this only:<img src='banners/RANDOMBANNER.jpg'> I just tested it out on my server and it works fine :(
I figured out the problem, I think. It's nothing to do with the PHP code being wrong, it's just being included in the HTML wrongly... I am working on it now!
Looks like your original code contained a more catch-all method of scanning a folder for images of various types, with a more flexible naming convention. Might wanna use that in conjunction with my oh-so-simple "echo" :)
Still the same thing :( the file is located in /images/rotate.php The images I want to use are in /images/headers The code for rotate.php is this: <? = getcwd() . "/headers"; = @opendir() or die("Unable to open "); = 0;while ( = readdir()) { if(!="." && !="..") { = ; ++; } } = - 1; = rand(0,);echo "<img src='headers/" . .…
What would I do to that code to have it not-make a new image each time, but rather use one of the existing gifs in that folder? Rick is correct, him and I tried 3 different php files and 2 had the same result, the other would only generate a new image on a hard-refresh of the page (F5, not hitting the refresh button). So…
Hey everyone, I have a huge favour to ask and I am hoping someone out there knows a few tricks =) I've got a few days off and I am busy working on the Polycount stuff. One of the new features is our headers will be rolling. (Heads will roll! Ha!). Anyway, the artwork for the headers will be of artwork by you guys (more on…