CodeIgniter Forums
Issue about URLs, can not load image when url: http://localhost/M4U/index.php/ - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Issue about URLs, can not load image when url: http://localhost/M4U/index.php/ (/thread-41471.html)



Issue about URLs, can not load image when url: http://localhost/M4U/index.php/ - El Forum - 05-09-2011

[eluser]Nguyen The Nguyen[/eluser]
in a view file
Code:
<head>
<title> M4U Music</title>
</head>
<boby>
<img src="imgs/hot4.png">
&lt;/body&gt;
When URL: http://localhost/M4U/
this file hot4.png is load success
But URL: http://localhost/M4U/index.php/
is file hot4.png not be load

very expect be the help


Issue about URLs, can not load image when url: http://localhost/M4U/index.php/ - El Forum - 05-09-2011

[eluser]InsiteFX[/eluser]
Code:
<img src="&lt;?php echo base_url();?&gt;imgs/hot4.png">

Or you can use the URL Helper img tag.

InsiteFX


Issue about URLs, can not load image when url: http://localhost/M4U/index.php/ - El Forum - 05-09-2011

[eluser]Nguyen The Nguyen[/eluser]
OK, thanks