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

[eluser]Colin McCubbin[/eluser]
Aaagh! Something is still wrong with my understanding of the paths involved.

menu.php is my controller, and menu_view.php is the view, in their respective folders.

1. If I type
Code:
http://localhost/codeIgniter/index.php/menu
the expected page with my images appear.

But to set menu as my default controller, in routes.php I set
Code:
$route['default_controller'] = "menu";
and now:

2. When I type
Code:
http://localhost/codeIgniter/
my page appears with the text from the db, so menu is working, but no pictures...

I've tried adding a duplicate 'pics' folder as a sibling to 'controllers' and 'views' but still no pictures.

I'm currently at a loss to under stand the relationship 'pathwise' between html in view files and folders elsewhere on the site, especially as it seems to alter as described above.

In the first instance where the picture displays, if I do view picture in my browser the url is as expected, namely
Code:
http://localhost/codeIgniter/pics/Aragon.jpg

In the second, no picture, if I do view picture in my browser, the url is:
Code:
http://localhost/pics/Aragon.jpg
so I'll have to go into my db again and change the html links from "../pics/Aragon.jpg" to just "pics/Aragon.jpg"

Edit: Tried this and it works.. :lol:

If anyone can take the time to explain why the paths changed to me I'd be very much in your debt!

Thanks.


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



Theme © iAndrew 2016 - Forum software by © MyBB