CodeIgniter Forums
Strange leading tag at the eval. [CI_Loader::_ci_load] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Strange leading tag at the eval. [CI_Loader::_ci_load] (/thread-44981.html)



Strange leading tag at the eval. [CI_Loader::_ci_load] - El Forum - 09-03-2011

[eluser]urrus[/eluser]
Hallow.

Please, could You explain me the purpose of the PHP closed tag that added at the front of the eval string (when loading view file without short tags)?

CI_Loader::_ci_load (line:679)
Code:
echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));


I wonder why do we need this <b>'?&gt;'</b> ?

Thanks.