Call to undefined function - still need help |
Hi there,
Good day. My Code worked on CI V4.4.3. On my MacOS env it works quite well. Mamp Pro with PHP V8.2.0 When I deployed to my local CentOS V7 with PHP V8.2.16. But my app doesn't work on CentOS now. Error. Call to undefined function display_error() I already googled some articles and solutions, but these information don't work on my situation. My code as below, view page: the last line is <small class="text-danger"><?= isset($validation) ? display_error($validation, 'email') : '' ?></small>, the erro function trigged from there. Code: <form action="<?= base_url('auth/check') ?>" method="post" autocomplete="off"> And my controller as this, Code: class AuthController extends BaseController I also tested add the help in BaseController as below since I found one post suggested as this way. Code: protected $request; All of these methods don't work. Could anyone give me other suggestion? thank you so much. Best Regards. Nano HE.
What is the function display_error()?
There is no such function in PHP or CodeIgniter. (05-14-2024, 09:16 PM)kenjis Wrote: What is the function display_error()? It comes from ci/app/Helpers/Form_helper.php Code: <?php
The Form helper file must be "form_helper.php".
See https://codeigniter.com/user_guide/gener...g-a-helper (05-14-2024, 09:36 PM)kenjis Wrote: The Form helper file must be "form_helper.php". Thanks a lot. it works now. I need read the guide more detail and carefully. Best Regards NanoHE. |
Welcome Guest, Not a member yet? Register Sign In |