I wish to display an image in a website using PHP - MVC framework. I've got the following in views:
echo("<img src=\images/test.jpg" />");
but all I am is getting a square coming up. Can someone give me a nudge in the right direction?
Thanks
I wish to display an image in a website using PHP - MVC framework. I've got the following in views:
echo("<img src=\images/test.jpg" />");
but all I am is getting a square coming up. Can someone give me a nudge in the right direction?
Thanks
I don't know if you're still looking for an answer but I assume you have the image folder in your root. Then you can display the image by adding base_url() to the path.
echo '<img src="' . base_url() . '/images/test.jpg" />';
(you where also missing a double quote for src=")