Welcome Guest, Not a member yet? Register   Sign In
codeigniter is not parsing html from db for php tags...?
#4

[eluser]Colin McCubbin[/eluser]
Thanks for the info.. I've realized that yes, ci is just outputting the contents of a variable, so doesn't do any parsing on it.

And Colin, thanks , I'll check out the template library .

I fixed my problem for now, the php code was just referencing images, and after trying various paths I found that if I moved my 'pics' folder to be a sibling to 'system', (ie under the site root) I just had to replace all refs in my database from code such as:
Code:
<?php echo img('system/application/pics/Aragon.jpg');?>


to a straight html:
Code:
<img src="../pics/Aragon.jpg" />
and everything works fine.

I'm sure there is 'better way' to do this, but I'm learning oop and ci hand in hand and if everything worked first time I'd probably learn less! I had thought that paths would be relative to the file they were 'in', eg that pics would be referenced as a sibling of the view folder that contained the view, but it turned out that it had to be referenced to the original controlling index.php file (I guess??)


Messages In This Thread
codeigniter is not parsing html from db for php tags...? - by El Forum - 01-03-2009, 01:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB