Welcome Guest, Not a member yet? Register   Sign In
CI4 controller error with built-in php class (intl)
#1

this my code

PHP Code:
46     public function view_receipt($id)
47     {
48         $data['receipt'] = $this->company_model->get_receipt($id);
49         $data['receipt']->description explode('^'$data['receipt']->description);
50         $data['receipt']->price explode('^'$data['receipt']->price);
51         $data['receipt']->quantity explode('^'$data['receipt']->quantity);
52         $data['company'] = $this->company_model->get_my_company();
53         $credit_term = new NumberFormatter("en"NumberFormatter::SPELLOUT);
54         $data['credit_term'] = $credit_term->format($data['receipt']->credit_term);
55         echo view('templates/receipt'$data);
56     

at line 53 i try to use NumberFormatter class which is built-in php by enabling intl extension.
working fine in php CLI.

but issue an error when use it in controller.


Quote:Error
Class 'App\Controllers\NumberFormatter' not found


APPPATH\Controllers\Home.php at line 53
Reply


Messages In This Thread
CI4 controller error with built-in php class (intl) - by nmaa3003 - 07-17-2020, 02:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB