Welcome Guest, Not a member yet? Register   Sign In
Automatic Short Tag and absolut path

Hello I test codeigniter 2.0 and it seem have a little problem with Automatic Short Tag
I've the famous eval() errors when i put rewrite_short_tags in TRUE;

It don't work with relatif path !

Exactly what I 've got:
A PHP Error was encountered
Severity: Warning
Message: include_once(templates/default/includes/footer.php) [function.include-once]: failed to open stream: No such file or directory
Filename: core/Loader.php(689) : eval()'d code
Line Number: 23

But if I put an absolute path it's work Smile

File application/config.php
$config['server_root']    = $_SERVER['DOCUMENT_ROOT']."/myproject";
$config['templates'] = $config['server_root']."/ci_2011/application/views/templates/";

File application/views/templates
include_once  $this->config->item('template').$version_css.'/includes/footer.php';

And the problem disappear if I get rid of the short tags... it's weird, no ?
$config['rewrite_short_tags'] = FALSE;

Ok I put short_open_tag in On in my php.ini file

There aren't any problem.

Theme © iAndrew 2016 - Forum software by © MyBB