Failed to load helper "Unable to load the requested file: helpers/login_helper.php"

Asked

Viewed 381 times

1

Good morning guys, I can’t load my helper with Codeigniter, I have no idea what happens:

my autoload.php is like this:

$autoload['helper'] = array('url', 'login');

and my helper is like this:

<?php
/**
 * Created by Andre Tohouca Lacomski on 02/04/2019
*/
if ( !defined('BASEPATH')) exit('No direct script access allowed');
function is_logged_in() {
$CI =& get_instance();
$status = $CI->session->userdata('logged_in');
if (!isset($status)) {
    return false;
}else {
    return true;
}
}
?>

And this error appears:

An Error Was Encountered Unable to load the requested file: helpers/login_helper.php

1 answer

1


Check the following possibilities that generate error:

  1. Your helper file is even in the directory ../application/helpers?
  2. Your file is called even login_helper.php?
  3. Did you program on Windows after deploying on Linux or vice versa? File names with different uppercase or lowercase become different files as well.
  • 1

    I just found the error.... I wrote login_heaper.php, now it worked

Browser other questions tagged

You are not signed in. Login or sign up in order to post.