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

[eluser]ludovic[/eluser]
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:
Code:
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
Code:
$config['server_root']    = $_SERVER['DOCUMENT_ROOT']."/myproject";
$config['templates'] = $config['server_root']."/ci_2011/application/views/templates/";

File application/views/templates
Code:
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 ?
Code:
$config['rewrite_short_tags'] = FALSE;
#2

[eluser]ludovic[/eluser]
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