你的問題是不是雙方rotate.php和DLE劇本的問題,但它的問題在哪裏放置「rotate.php」文件的位置,你不能放置任何PHP文件你主題文件夾,它會被腳本和htaccess阻止,所以解決方案很簡單,在「模板」文件夾之外的根目錄下創建新文件夾,例如:「header」或「background」
然後放置所有圖像並旋轉.php文件夾內,所以你可以訪問文件夾和圖像像
http://your-domain.com/header/rotate.php
http://your-domain.com/header/image-1.php
http://your-domain.com/header/image-2.php
...
or
---
http://your-domain.com/background/rotate.php
http://your-domain.com/background/image-1.php
http://your-domain.com/background/image-2.php
你main.tpl應該是這樣的
<style type="text/css">
.header_img {
overflow: hidden;
width: 1010px;
margin: 0 auto;
height: 276px;
background: url(/header/rotate.php) no-repeat center 0;
/* or */
/*
background: url(/background/rotate.php) no-repeat center 0;
*/
border-width: 0 1px;
</style>
<!-- /header -->
</header>
<div id="header_img">
<div class="header_img"><!-- no text --></div>
</div>
從「模板」文件夾中保留所有的PHP文件了。並且不要將css放在任何css文件中,將所有代碼放在main.tpl中。
或者您可以使用這種技術,我們在我們沒有爲他們設計的
1)下載rotator.txt從A List Apart一些網站使用,將其重命名rotator.php。
2)將圖像旋轉到與rotator.php相同的目錄中。
3)通過FTP上傳所有文件。
4)main.tpl在瀏覽器中添加該代碼
<style type="text/css">
#rotator{
overflow: hidden;
width: 1010px;
margin: 0 auto;
height: 276px;
background: url(/background/rotate.php) no-repeat center 0;
border-width: 0 1px;
</style>
<!-- /header -->
</header>
<div id="rotator"> </div>
打開'rotate.php'和檢查如果PHP正確呈現圖像。 – Scony 2014-09-24 16:32:49