Welcome Guest, Not a member yet? Register   Sign In
I'm probably doing something stupid but it seems to be autoloading my helper class

(This post was last modified: 06-09-2015, 03:31 AM by DreamOfSleeping.)

Hi. I have a helper class called my_url_helper. This has some simple functions called css_url, js_url, and image_url to help me load them. It works great. Then I noticed I had forgot to load the helper on half my pages, but it still works and I don't know why.

Things I've tried.

I checked and double checked the autoload file to make sure I hadn't added it to it. I haven't

I commented out all the parts in my code where I load the helper in case codeigniter somehow remembered it. It still works.

I wondered if the file had just been cached or something, so I added another function to the helper class called poo_face that simple returns a string saying "pooooooo face". I added a call to the poo_face function, and it worked despite the helper not being

I thought I would ask here in case there is something that I might have overlooked.

Here is a one of my controllers and the view that has the functions.

PHP Code:

class User extends CI_Controller {
function __construct() {
function home() {
function profile() {
function add_creation() {

<!DOCTYPE html>
       <title>Add Creation</title>
       <meta charset="UTF-8">
             // both these functions are found in my_url_helper, not to be confused with the official url helper.
             echo css_url('create-critique'); // this prints out the css url
             echo poo_face(); // this prints pooooo face

Messages In This Thread
I'm probably doing something stupid but it seems to be autoloading my helper class - by DreamOfSleeping - 06-09-2015, 03:30 AM

Theme © iAndrew 2016 - Forum software by © MyBB