Problems in views when reinstall appserv - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Problems in views when reinstall appserv (/showthread.php?tid=76502) |
Problems in views when reinstall appserv - Edel - 05-18-2020 Hello everyone. I am developing in CI 4. I changed the appserv version recently. I saved my project from the old www folder and copied it into the new www in my new installation. but when I send variables to the view it doesn't recognize them. PHP Code: $result->adverts = $adverts; //ad list In my view : APPPATH/Views\tools\previews.php Code: <? the error that return is "ErrorException, Undefined variable: advert" in APPPATH/Views\tools\previews.php at line 9 the lines 2 and 3 don't print anything. why if lines two an three does not print anything code is executed inside the foreach I have not changed anything within my project. I suppose the problem is related to some php or apache configuration. php 7.3.10 Thanks in advance. RE: Problems in views when reinstall appserv - Edel - 05-22-2020 My friends. I solved the problem by enabling short-open-tag in the php.ini file RE: Problems in views when reinstall appserv - jreklund - 05-22-2020 (05-22-2020, 11:28 AM)Edel Wrote: My friends. I solved the problem by enabling short-open-tag in the php.ini file Hi, you should fix those problems instead. Changing your <? into <?php, that's just a bad practice requiring to have that on. |