Question and answer is powered by AnsPress.io
I am creating an HTML page and I developing with Codeigniter framework and I want to set a background image that image URL is the print from the database. Anyone can help me please to do it.
Set background image path dynamically in HTML body tag using base URL in Codeignitr, you can try this code:
<!-- HTML body Tag --> <body background="<?php echo base_url();?>assets/img/<?php echo $data->photo; ?>">
use this image:url(“<?php echo base_url(‘uploads/10f3_img.jpg’);?>”);