我用CakePHP创建了一个网站。这里:http://www.aaryanahmed.net/
我使用了cakephp主题。主题路径为app/view/ Theme /orange。它在我的本地主机上运行得很好,但当我通过Cpanel上传它时,它现在可以工作了。
在AppController中,我是这样介绍主题的
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
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
https://stackoverflow.com/questions/18572364
复制相似问题