我BASE_URL是:我如何使codeigniter中的base_url成爲動態的一部分?
$config['base_url'] = 'http://localhost/VI';
這是我的形象的一個環節:
<img src="<?php echo base_url('assets/images/footer.png')?>">
其做工精細。我的需要是, footer.png是我需要從數據庫中獲取這個圖像名稱的圖像。
而且有可能通過這樣的:
http://localhost/VI/assets/images/<?php echo $footer->image;?>
,這是對我工作的罰款。
現在我需要知道有包括<?php echo $footer->image;?>
在
<?php echo base_url('assets/images/footer.png')?>
,而不是footer.png
任何方法。
有在BASE_URL的'末尾的斜槓()'爲[文檔說]( https://github.com/bcit-ci/CodeIgniter/blob/develop/application/config/config.php#L10)。像'$ config ['base_url'] ='http:// localhost/VI /';' – Tpojka