首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >CakePHP主题在实时服务器上不起作用

CakePHP主题在实时服务器上不起作用
EN

Stack Overflow用户
提问于 2013-09-02 19:37:36
回答 1查看 322关注 0票数 0

我用CakePHP创建了一个网站。这里:http://www.aaryanahmed.net/

我使用了cakephp主题。主题路径为app/view/ Theme /orange。它在我的本地主机上运行得很好,但当我通过Cpanel上传它时,它现在可以工作了。

在AppController中,我是这样介绍主题的

代码语言:javascript
运行
复制
public function beforeRender() {
if (
        $this->params['action'] == 'index'
        || $this->params['action'] == 'edit'
        || $this->params['action'] == 'add' && $this->params['controller'] != 'contacts'
        || $this->params['action'] == 'delete'
        || $this->here != 'http://www.aaryanahmed.net/'
    ) 
    {
        $this->theme = null;
    }

else if($this->params['plugin'] == 'usermgmt')
    {
        $this->theme = '';
        $this->layout = 'usermgmt';
    }
else {$this->view = "Theme";
    $this->theme = 'orange';
}

}

即使我使用$this->theme =‘orange’,主题也不起作用;在AppController中,我的htaccess文件是lihe

代码语言:javascript
运行
复制
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18572364

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档