![]() |
php question
I have a wordpress blog set up and I want the header image to rotate randomly, so I use this script http://www.alistapart.com/d/randomizer/rotate.txt (rename it to rotate.php)
and put this in CSS file image:url(images/headers/rotate.php); background-repeat:no-repeat; background-position:top; height:309px; } But the when I go to the rotate.php the website returns the text of the script instead of executing it. How do I get it to execute? |
Re: php question
image:url(images/headers/rotate.php);
image: isnt a css property and: rotate.php is the script file, and cant be added as an image anyway (image=picture) i havnt used wordpress, is it PHP? for php, you will want something like: include 'images/headers/rotate.php'; for HTML you will want <!--#include file="images/headers/rotate.php" --> insert this line of code into the page, not the css |
Re: php question
the image property was in the original wordpress css file.
I was following the instructions here: http://sonspring.com/journal/easy-ra...ss-backgrounds And wordpress is php |
Re: php question
background: url(images/rotator.php);
thats right, you had image: url(images/rotator.php) |
Re: php question
sorry I didn't copy it properly:
this is what doesn't work #main-img{ width:906px; background-image:url(images/headers/rotate.php); background-repeat:no-repeat; background-position:top; height:309px; } |
Re: php question
.php files can be linked as images as they can be set to return an encoded image file rather than text, downquark, maybe you could link me to your site so I can take a look
|
Re: php question
but "image:" isnt a css property
|
Re: php question
Thanks to Graham for solving my problem. Some how some screwy metadata had got inserted into the file without me noticing.
|
Re: php question
Basically something can converted all of the symbols in the code to HTML characters like < for instance and some data had been inserted that didn't belong which would have corrupted the output images anyway
|
| All times are GMT. The time now is 14:20. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum