开发者

Codeigniter: php not working in the view!

I have just moved my working codeigniter site to a new 开发者_开发百科xampp installation on new computer and now when the view loads the php inside the view doesn’t work!! e.g. the addresses in my links have the code in them instead of the base address of the site!!!

Can anyone explain this strange behavior???

(using windows 7)

Thanks!

jk


The problem is likely that your PHP configuration on your XAMPP install isn't configured to allow PHP short tags, eg: <?=$foo;?> such that only <?php echo $foo; ?> will work. You can manually change all of these instances or you can edit a value in application/config/config.php to have CodeIgniter rewrite short codes in your views. I think it is: rewrite_short_tags

Alternatively you can change the setting in your php.ini configuration file which I believe is accessible by right clicking on the XAMPP icon in your taskbar's notification area. See: http://php.net/manual/en/ini.core.php#ini.short-open-tag


Turns out short codes were set to off in the php.ini !!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜