ds3422222 2013-09-23 11:12
浏览 12

global header.php不在随机页面上显示某个图像[关闭]

I'm working on a website that was originally built using codeigniter. It's a mess on the back end and there's no identifiers to anything really. I've recently changed a banner (header.php) and edited the style to fit as required. I added a simple img source= and a href= into the header.php and it seems to be displaying fine on the homepage. However once I navigate away to other pages the img source isn't displaying whilst all my other changes are?

The a href link remains with the class but the image is displaying as broken.

I've checked all the locations etc and it's all pointing to the correct place?

Any ideas?

  • 写回答

1条回答 默认 最新

  • drktvjp713333 2013-09-23 11:41
    关注

    I understood that you have given relative path to your image directory. You have to prepend base_url in src tag as follows

    <img src="<?php echo base_url('/path/to/image.jps');?>" alt="Image"/>
    
    评论

报告相同问题?

悬赏问题

  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 正弦信号发生器串并联电路电阻无法保持同步怎么办
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序