CodeIgniter css樣式不顯示有關問題

來源:互聯網
上載者:User
CodeIgniter css樣式不顯示問題
這是我的引用css的代碼




<?php echo $title ?> - News



News



這是我的config.php的檔案

$config['base_url']= 'http://127.0.0.1/myPhpStudy/index.php/';

這是產生頁面後的原始碼,點擊href串連顯示404,我懷疑可能路徑錯誤,可是我不知道哪裡錯了
    


Create a news item - News



News



Create a news item







Title




Text






wsdfsfdsa


我的css檔案夾和header.php頁面都是在news檔案夾下面的,不知道到底哪裡錯了,請大牛指點啊,本人是剛剛接觸php的
------解決方案--------------------
http://127.0.0.1/myPhpStudy/index.php/css/yangshi.css" />
這是有效地路徑嗎?
難道 index.php 是目錄?
------解決方案--------------------
base_url("css/yangshi.css");?>" />試試?
------解決方案--------------------
href=""這個在頁面上列印出來的串連發出來看看
------解決方案--------------------
dirname($this->config->item('base_url'));?>css/yangshi.css" />
------解決方案--------------------


------解決方案--------------------
貼出的的目錄結構
並指出你的檔案的位置
------解決方案--------------------
在網站直接輸入http://127.0.0.1/myPhpStudy/index.php/css/yangshi.css能訪問嗎?是不是css這個目錄限制訪問的?
------解決方案--------------------
執行的檔案為 myPhpStudy/index.php
樣式表在 myPhpStudy/application/css 中
所以樣式表的路徑應為
dirname($this->config->item('base_url')) . '/application/css/'
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.