views:

151

answers:

2

Hello,

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

A: 

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

kavs
Thanks for posting the answer after finding it.
Brian
+2  A: 

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

sholsinger