Welcome Guest, Not a member yet? Register   Sign In
No direct script access allowed

guys why im getting in alert response ajax: No direct script access allowed
//--------------------------view with js included
type: "POST",
url: "<?php echo base_url('login/checa_login'); ?>",
data: $("form").serialize(),
dataType: "text",
success: function(data) {alert(data);



if (!defined('BASEPATH'))
exit('No direct script access allowed');

class Login extends CI_Controller {

function __construct() {
$this->load->helper(array('form', 'url'));

function index() {
$dados = array(
"titulo" => "Login",
$this->load->view('login/login', $dados);

function checa_login() {
echo json_encode(array("nome"=>"server ok!")); die;


can any1 help me? when its local, running ok, but in my server i see this error alert: No direct script access allowed

Look at the .html file in that directory and you will see why your getting that Error.

Theme © iAndrew 2016 - Forum software by © MyBB