Welcome Guest, Not a member yet? Register   Sign In
Helper - Call to undefined function
#1

(This post was last modified: 10-16-2020, 03:10 AM by sjender.)

Hi All,

I'm new to CI (just started this week).

I am trying to get my own custom helper to work, but I keep getting 'Call to undefined function' errors.

Here's my code:

app/Helpers/build_page.php
PHP Code:
<?php

function tester(){
    return "test";


app/Controllers/News.php (snippet)
PHP Code:
public function index()
    {
        helper('build_page');
        echo tester(); 

As read in the manual I guess this should work?
But I keep getting:

Call to undefined function App\Controllers\tester()

What am I missing here.
Reply


Messages In This Thread
Helper - Call to undefined function - by sjender - 10-16-2020, 03:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB