3
I am new using the IC, and I’m having problems with it because it does not load the images in environment localhost (using XAMPP). I have already inspected and checked if the path is all ok, and this indeed, but nothing from the image load.
I have tested in localhost, but without using the IC and the image loads normally, I would like someone with more knowledge that I help me.
<div id="products">
<ul>
<?php foreach ($products as $product): ?>
<li>
<?php echo form_open("shop/add"); ?>
<div class="name"><?php echo $product->name; ?></div>
<div class="thumb">
<?php echo img(array(
'src' => 'img/'.$product->image,
'class' => 'thumb',
'alt' => $product->name)); ?>
</div>
<div class="price">$<?php echo $product->price; ?></div>
<?php echo form_close(); ?>
</li>
<?php endforeach; ?>
</ul>
</div>
$config['base_url'] = 'http://localhost/carrinho/';
you are using a direct helper or img tag? if you have the source code edit the question and add it. The
base_url
is configured as?– rray
The html generated by
img()
comes as?– rray
<img src="http://localhost/cart/img/rubbar.jpg" class="Thumb" alt="Rubbar">
– Flavio Domingos
has a http:// before localhost
– Flavio Domingos
utlized helpers - form, html, url
– Flavio Domingos
Try to change the
base_url
just for the name of the project, I believe that so it should access theassets/img
– rray
put $config['base_url'] = 'cart/'; and nothing :/
– Flavio Domingos