Reputation:
My image didn't call, with the current path. How to fix it? The folder data in out of folder application.
I'm using a framework Codeigniter
with Bootstrap
.
<center>
<a href="../../data/images/buying.png" data-fancybox="group" data-caption="How to Buying in Store">
<img class="img-flu rounded mb-4" src="../../data/images/buying.png" alt="" >
</center>
Upvotes: 0
Views: 63
Reputation: 130
First, you need to set up this on application->config->config.php before using the base_url().
$config['base_url'] = 'http://localhost:8000/sitename';
In view
<center>
<a href="<?php echo base_url() ?>data/images/buying.png" data-fancybox="group" data-caption="How to Buying in Store">
<img class="img-flu rounded mb-4" src="<?php echo base_url() ?>data/images/buying.png" alt="" >
</center>
For more info about the proper setup or uses of base_url()
How to set proper codeigniter base url?
Upvotes: 1