-2

I'm quite new to php and trying to test my php script online and came across 'FATAL ERROR syntax error, unexpected 'is' (T_STRING) on line number 12'. What can be done to fix this error? I'm trying to test the php online so I can work out how to add payment apis.

The PHP

defined('BASEPATH') OR exit('No direct script access allowed');  
class Processing extends CI_Controller {
 public function __construct(){
         parent::__construct();
        if($this->session->userdata("userID") == "")
        {
          $this->session->set_flashdata("processloginredirect",1);
         redirect(base_url());
        exit;
        }  
    }
    public function index()
Jonny
  • 1,319
  • 1
  • 14
  • 26
Lewis
  • 1
  • 4

1 Answers1

0

I've had really odd errors like this before. You may have an invisible character or unicode lookalike on that line. Try this:

Select $this on that line.

Delete it.

Re-type it manually. (No copy / paste.)

Max
  • 913
  • 1
  • 7
  • 18
  • Well then either there's an 'is' on that line, or you're looking in the wrong file. – Max Feb 09 '18 at 01:52