php - Show an Image from controller, base_url() error

Solution:
Here is your code for view file
<button type='button' class='btn btn-default btn-sm' id='deleteLevel'
value='<?php echo $key->cmpUsoID;?>'>
<img src='<?php echo base_url('static/images/delete.png'); ?>' alt='Borrar' title='Borrar'>
</button>
if you need in controller then
$button = '<button type="button" class="btn btn-default btn-sm" id="deleteLevel"
value="'.$key->cmpUsoID.'">
<img src="'.base_url("static/images/delete.png").'" alt="Borrar" title="Borrar">
</button>';
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: apache/2.4.52 (win64) openssl/1.1.1m php/8.1.2 server at localhost port 80
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.