View not executing PHP code - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: View not executing PHP code (/showthread.php?tid=20919) |
View not executing PHP code - El Forum - 07-25-2009 [eluser]HooJee[/eluser] Hi Guys I cannot execute PHP code in my view files. The controllers on the other hand work perfectly fine. I am using WAMP 2.0 View not executing PHP code - El Forum - 07-25-2009 [eluser]kgill[/eluser] It would be helpful to see the code in the view and the controller, also are you getting any error messages? If you want help you have to give us a little more info. View not executing PHP code - El Forum - 07-25-2009 [eluser]HooJee[/eluser] The code is pretty straightforward. See below: // home.php controller Code: <?php //homeview.php Code: <?xml version="1.0" encoding="utf-8"?> View not executing PHP code - El Forum - 07-25-2009 [eluser]wabu[/eluser] Is short_open_tag enabled in php.ini (http://us3.php.net/manual/en/ini.core.php)? You might try using "<?php" in your template first to see if that works. View not executing PHP code - El Forum - 07-25-2009 [eluser]HooJee[/eluser] Oh yes! Silly me, how could I forget. BTW, I have noticed people do the following to get the base url: <?=base_url?> Whenever I try it I get a blank. It'll only work if I use echo. Do you know why this could be happening? View not executing PHP code - El Forum - 07-25-2009 [eluser]jayrulez[/eluser] [quote author="HooJee" date="1248563896"]Oh yes! Silly me, how could I forget. BTW, I have noticed people do the following to get the base url: <?=base_url?> Whenever I try it I get a blank. It'll only work if I use echo. Do you know why this could be happening?[/quote] for d same reason above |