Codeigniter Parse错误:语法错误,第1行意外的T_CLASS

时间:2015-05-28 16:55:22

标签: php codeigniter

我有一个codeigniter控制器,可以在wamp和ubuntu-lamp服务器上完美运行。但是在托管网站后我收到了这个错误

Parse error: syntax error, unexpected T_CLASS in /home/u885964134/public_html/gbu_helpdesk/application/controllers/Show_ticket.php on line 1
A PHP Error was encountered
Severity: Parsing Error
Message: syntax error, unexpected T_CLASS
Filename: controllers/Show_ticket.php
Line Number: 1

其他控制器工作正常,T_CLASS不在我的控制器中(或我的代码中的任何位置)

问题可能与行结尾或其他内容有关。 作为参考我的代码(它在wamp,ubuntu-lamp上完美运行)

<?php
/* 
 * Copyright (C) 2015 <> - All Rights Reserved
*/
class Show_ticket extends CI_Controller
{
    function index($tick_no = '000z')
    {
        if($tick_no == '000z')     redirect ("all_tickets");
        if ($this->session->userdata('loggedin') != 1) 
        {//Checking for authentication
            redirect('/login');
        }
        $this->session->set_userdata('tick_no',$tick_no) ;
        $this->load->helper(array('form', 'url'));
        $this->load->library('form_validation');

        $this->form_validation->set_rules('mod_note', 'Moderators Note', 'required');

        $this->load->view('common/header');
        //$this->load->view('Load_ticket');
        if ($this->form_validation->run() == FALSE)
        {
                $this->load->view('Load_ticket');
        }
        else 
        {
             $m_note =   $this->input->post('mod_note');
             $action = "<b>".$this->session->userdata('username') . "</b> posted:<br>" . $m_note;
             $etc_action =   $this->input->post('etc_action');
             if($etc_action!='none')
             {
                 $this->session->set_userdata('yo_enter_log',1);
                 $this->session->set_userdata('add_log',$action);
                 redirect($etc_action);
             }

             $date = date('Y-m-d');
             $time  = date('H:i:s');

             $ticket_no = $tick_no;
             $action_type = "add_note";
             $this->db->query("INSERT INTO problem_logs (ticket_no,date,time,action_type,action) VALUES('$ticket_no','$date','$time','$action_type','$action')");


             redirect('/Show_ticket/index/'.$tick_no);
        }
        $this->load->view('common/footer');
    }
}

0 个答案:

没有答案