Welcome Guest, Not a member yet? Register   Sign In
deactivate PHP in views
#4

[eluser]patwork[/eluser]
Well, maybe it's not that easy. Views are loaded and executed in Loader class (system/core).

Code:
/**
* Loader
*
* This function is used to load views and files.
* Variables are prefixed with _ci_ to avoid symbol collision with
* variables made available to view files
*
* @access    private
* @param    array
* @return    void
*/
function _ci_load($_ci_data)

here's interesting part:

Code:
if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)
{
    echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
}
else
{
    include($_ci_path); // include() vs include_once() allows for multiple views with the same name
}

I'm afraid you'll need to change this, so views are not executed automatically. Remove 'eval' and change line with include to:

Code:
echo file_get_contents($_ci_path);


Messages In This Thread
deactivate PHP in views - by El Forum - 04-11-2011, 04:13 PM
deactivate PHP in views - by El Forum - 04-12-2011, 02:23 AM
deactivate PHP in views - by El Forum - 04-12-2011, 03:14 AM
deactivate PHP in views - by El Forum - 04-12-2011, 06:47 AM
deactivate PHP in views - by El Forum - 04-12-2011, 07:53 AM
deactivate PHP in views - by El Forum - 04-12-2011, 08:43 AM
deactivate PHP in views - by El Forum - 04-12-2011, 10:17 AM
deactivate PHP in views - by El Forum - 04-12-2011, 04:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB