![]() |
I am developing specific software and I have a problem
I am loading a file via autoload. In Autoload.php: PHP Code: public $files = [ PHP Code: class Home extends BaseController In the main.php file I try to output it via var_dump($x); As a result I see NULL! ![]() This problem has been bothering me for a long time And also this code: PHP Code: class Home extends BaseController Help!
Yes, there is such a problem. I can only get a variable from a file main.php But the init.php file is loaded 100%
Try write code in app/Common.php.
He load before controller
https://github.com/codeigniter4/CodeIgni...r.php#L309
Include files ONCE, may be here problem. (01-03-2024, 11:38 AM)ozornick Wrote: https://github.com/codeigniter4/CodeIgni...r.php#L309 No, nothing changes I will have to abandon the framework; a functional programming project is not suitable for it. I still only need a database library, I don’t make a web site I have already created a topic and will go look for the library |
Welcome Guest, Not a member yet? Register Sign In |