Reputation: 163
I got a strange error in Codeigniter error : define() expects at least 2 parameters in Line 1.
What is wrong with my code below
<?php if ( ! define('BASEPATH')) exit('No direct script access allowed');
class Login extends CI_controller {
function __construct(){
parent::__construct();
}
public function index(){
$this->load->view('login_view');
}
}
Upvotes: 0
Views: 2156
Reputation: 1
Try this may be it works:
defined('BASEPATH') OR exit('No direct script access allowed');
Upvotes: 0