第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

有沒有辦法在許多頁面 php 中顯示徽標(biāo)?

有沒有辦法在許多頁面 php 中顯示徽標(biāo)?

PHP
九州編程 2021-11-13 16:50:49
我已經(jīng)在 header.php 上寫了一個(gè)代碼 logo/img但是,當(dāng)我要刷新時(shí),不想顯示徽標(biāo)。有解決辦法嗎?我使用了 bootstrap 4,簡單的 html 和 css。我已經(jīng)嘗試了很多次,但總是失敗。在任何功能中,徽標(biāo)已經(jīng)顯示,但在“tambahalternatif”中不想顯示這是我的控制器:<?php    class Alternatif extends CI_Controller{        public function __construct()        {            parent::__construct();            $this->load->model('Alternatif_model');            $this->load->library('form_validation');        }        public function index()        {            $data ['judul'] = 'Isi Alternatif';            $data ['alternatif'] = $this->Alternatif_model->getAllAlternatif();            if($this->input->post('key')){                $data['alternatif'] = $this->Alternatif_model->cariDataAlternatif();            }            $data['hasil'] = $this->Hitung(); //Manggil fungsi Hitung()             $this->load->view('templates/header',$data);            $this->load->view('alternatif/index', $data);            $this->load->view('templates/footer' );        }        public function tambahalternatif()        {            $data['judul'] = 'Form Tambah Data Alternatif';            // $this->form_validation->set_rules('idclient','ID','required|numeric');            $this->form_validation->set_rules('namaalt','NAMA','required');            if ($this->form_validation->run() == FALSE) {            $this->load->view('templates/header', $data);            $this->load->view('alternatif/tambahalternatif');            $this->load->view('templates/footer');        } else {            $this->Alternatif_model->tambahDataAlternatif();            $this->session->set_flashdata('flash','Berhasil');            redirect('alternatif');         }標(biāo)題視圖<nav class="navbar navbar-expand-lg navbar-light bg-light navbar-fixed-top ml-right"><div class="container"><a class="navbar-brand" href="<?=base_url(); ?>" ><img class="logo" src="./img/logo.png" height="28px;" padding="2px 10px;></a>   我希望圖像(徽標(biāo))將顯示在“tambahalternatif”中,但圖像(徽標(biāo))僅顯示在“alternatif”中
查看完整描述

3 回答

?
慕娘9325324

TA貢獻(xiàn)1783條經(jīng)驗(yàn) 獲得超4個(gè)贊

使用基本路徑而不是絕對路徑。

代替

<img class="logo" src="./img/logo.png" height="28px;" padding="2px 10px;>

用下面的線

<img class="logo" src="<?php echo base_url(); ?>img/logo.png" height="28px;" padding="2px 10px;>

這樣當(dāng)您更改視圖的路徑時(shí),徽標(biāo)的路徑就無需更改。


查看完整回答
反對 回復(fù) 2021-11-13
?
料青山看我應(yīng)如是

TA貢獻(xiàn)1772條經(jīng)驗(yàn) 獲得超8個(gè)贊

***Try this one & let us know is it ok now.

Thanks.***


<nav class="navbar navbar-expand-lg navbar-light bg-light navbar- 

fixed-top ml-right">


<div class="container">


    <a class="navbar-brand" href="<?= base_url(); ?>" >

        <img class="logo" src="<?= base_url().'img/logo.png'; ?>" 

        height="28px" padding="2px 10px">

    </a>


</div>


</nav>


查看完整回答
反對 回復(fù) 2021-11-13
?
三國紛爭

TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超7個(gè)贊

在標(biāo)題中嘗試此代碼


<body>

<img src="<?php echo base_url();?>imag/logo.png" height="28px" alt="">  

</body>


查看完整回答
反對 回復(fù) 2021-11-13
  • 3 回答
  • 0 關(guān)注
  • 180 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號