CakePHP を使用して Web サイトを作成しました。ここ: 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'; を使用してもテーマが機能しません。私のhtaccessファイルは
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>