我有一个非常基本的控制器,它只是加载一些模型并准备视图。 它在我的本地主机(XAMPP)上工作正常,但是当我将它上传到HostGator服务器时,我得到了
解析错误:语法错误,意外'仪表板'第1行/home3/fady1234/public_html/dubai/application/controllers/dashboard.php中的(T_STRING)
这是代码:
<?php
class Dashboard extends CI_Controller{
public function __construct() {
parent::__construct();
$data = array();
$this->load->model('admin_m');
$this->security_m->checkAdminSession();
$this->load->model('settings_m');
$this->load->model('property_m');
$this->load->model('community_m');
$this->load->model('service_m');
$this->load->model('complains_m');
$this->load->model('user_m');
$this->load->model('announcment_m');
$this->load->model('news_m');
}
public function index(){
$data['menu'] = 1;
$data['settings'] = $this->settings_m->get(null, null);
$data['property'] = $this->property_m->count();
$data['community'] = $this->community_m->count();
$data['service'] = $this->service_m->count();
$data['complains'] = $this->complains_m->count();
$data['users'] = $this->user_m->count();
$data['announcments'] = $this->announcment_m->count();
$data['news'] = $this->news_m->count();
$data['subview'] = 'admin/dashboard/index';
$this->load->view('admin/templates/header' , $data);
$this->load->view('admin/_layout_main');
$this->load->view('admin/templates/footer' , $data);
}
public function modal(){
$this->load->view('admin/_layout_modal' , $this->data);
}
}
?>
感谢您的帮助,我知道它很常见,我尝试了我可以在网上找到的所有资源,但它无法正常工作。