Welcome Guest, Not a member yet? Register   Sign In
PHP code is not interpreted correctly
#1

[eluser]aibanez[/eluser]
Many views files (.php) has similar code like this:
<link href="<?=$this->config->item('base_url');?>public/css/style.css" rel="stylesheet" type="text/css" />
My server is interpreting the php code after the href="<? as it is (text) not like php, i.e. the href does not replace the result of this->config->... etc.
Why is happening this? Anybody can help me.
Thank you in advance. :-S
#2

[eluser]Jelmer[/eluser]
Maybe try reading the User Guide?

PHP short-tags have been switched off by PHP by default for a while now (I think since PHP 5.1 but I'm not sure), so the only way you can use these is to let CI rewrite them to full PHP tags. I'd recommend writing those yourself as you'll add unnecessary extra memory and processing requirements by doing this.

More on short tags in the aforementioned User Guide.

If you really want to use them you might also try this, although I'm not sure that it works:
Code:
ini_set('short_open_tag', 'On');




Theme © iAndrew 2016 - Forum software by © MyBB