Welcome Guest, Not a member yet? Register   Sign In
Problem with CI4 session
#6

please help.

i have a libary code like bellow

libarary

<?php namespace App\Libraries\Mylibrary;

class Mylibrary{

function hitung(){
$angka = 2;
return $angka;
}
}

controller :

<?php namespace App\Controllers;

use App\Libraries\Mylibrary;

class Home extends BaseController
{

function sesi(){

$this->session->set('abc','item');
if ($this->session->get('abc')!='item') {
echo "string";
}else{
echo "strong";
}

echo hitung();
}
}

the error

Call to undefined function App\Controllers\hitung()

thanks.
Reply


Messages In This Thread
Problem with CI4 session - by webdevron - 12-15-2019, 12:25 AM
RE: Problem with CI4 session - by InsiteFX - 12-15-2019, 05:38 AM
RE: Problem with CI4 session - by webdevron - 12-15-2019, 02:00 PM
RE: Problem with CI4 session - by InsiteFX - 12-16-2019, 06:20 AM
RE: Problem with CI4 session - by InsiteFX - 12-16-2019, 09:17 AM
RE: Problem with CI4 session - by asepma - 04-24-2020, 04:19 AM
RE: Problem with CI4 session - by InsiteFX - 04-24-2020, 08:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB