Welcome Guest, Not a member yet? Register   Sign In
I cant load images or external files
#1

[eluser]atoleon[/eluser]
I have troubles trying load img or external files. i have the following configuration:

Code:
$config['base_url'] = 'localhost/ilthtml/';

And i write this for the external links and img:
<img src="&lt;?php echo base_url(" alt="">


then, when i access to localhost/ilthtml/index.php the picture its broken and is not visible.

Althoug, if i write this:
Code:
<div class="span3"><img src="img/patrocinadores/worten-yell.png" alt=""></div>
(without the base_url ()) and access to localhost/ilthtml/ te pics and external links are loaded right.

I dont know what to do. thank you for your help
#2

[eluser]atoleon[/eluser]
I have solved the problem changin this in the config file:

Code:
$config['base_url'] = ' ';

I cant understand it, because the base url must be configured with the route.
#3

[eluser]CroNiX[/eluser]
If you read the notes, CI will try to determine base_url automatically if it is left blank. This is fine for most setups. I believe your original problem was you left the "http://" portion off the base_url.

Code:
$config['base_url'] = 'http://localhost/ilthtml/';




Theme © iAndrew 2016 - Forum software by © MyBB