Welcome Guest, Not a member yet? Register   Sign In
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM
#1

[eluser]Suven[/eluser]
Hi!

I'm running a local dev-server for my first codeIgniter-Application.

In my local setup everything works like it should. The application itself is very minimal right now. Just the default welcome-controller, one for about and the latest version of Ion-Auth.

I then uploaded my app onto my server, changed the database-settings and imported them

Locally I'm using PHP 5.3.0 and online PHP 5.2.12.

Online I get the folowing error:

Code:
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /www/htdocs/xyz/crazy_application/controllers/welcome.php on line 33

Where my code is:

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends CI_Controller {

    function __construct()
    {
        parent::__construct();
        $this->load->library('ion_auth');
    }

    function index()
    {
        $header['page_title'] = 'Home';
        $this->load->view('common/header', $header);
        
        $data = null;
        
        // Additional infos for admins
        if ($this->ion_auth->is_group('admin')) {
            $data['noOfUsers'] = $this->ion_auth->get_users_count();
            $data['newestUsers'] = $this->ion_auth->get_newest_users();
        }
        
        $this->load->view('welcome/welcome_start', $data);
        
        $this->load->view('common/footer');
    }
    
    // Right now we have only one action on index.. So
    // all function-calls should call index only.
    function _remap($method)
    {
        $this::index();     // <----- THIS LINE
    }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */

Any ideas?

Thank you!
#2

[eluser]Suven[/eluser]
I bury my head in shame.

It should be
Code:
$this->index();

Sorry guys!




Theme © iAndrew 2016 - Forum software by © MyBB