1
votes

I have checked all config files, made sure the helpers are in both system/helpers and application/helpers as well as one or the other. I have tried autoloading helpers, loading the helper in my controller and from the view and no matter what I get an error.

Unable to load the requested file: helpers/_helper.php

It is treating it as if I am trying to load a blank helper such as $this->load->helper(''); but I am using $this->load->helper('url');

This is my controller to load my home page

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Pages extends CI_Controller {

  public function __construct(){
    parent::__construct();
    $this->load->helper('url');
  }

  public function index(){
    $this->load->view('templates/header');
    $this->load->view('home');
    $this->load->view('templates/footer');
  }
}

system/helpers/url_helper.php and application/helpers/url_helper.php both currently exist and have not been edited at all.

If needed I can include my autoload.php but the helper Auto-load Helper Files is currently $autoload['helper'] = array();

2
Helper files doesn't exist in APPPATH.'helpers/' directory by default. Just noticing that you say it's not edited. It is already set there by someone. Try to backup that file, remove it ant try again to see what will happen. - Tpojka
To be clear, do you mean to remove the helper files from the directory and then place them back in? - achill113
Remove custom helper file from application directory and try to load just default one from system directory. - Tpojka
I am not trying to load any custom helpers, only trying to load the default url helper - achill113
You can check in github repo. There is no helper files in application/helpers by default. - Tpojka

2 Answers

0
votes

If you need to over ride the url helper

rename the file

application/helpers/MY_URL_helper.php

OR

application/helpers/MY_url_helper.php
0
votes

Copy the whole path inside the url, like this , (wamp)

$this->load->helper('www/projectfoldername/applications/libraries/helpers/helperfile');