CodeIgniter CSS style does not display problems

Source: Internet
Author: User
This is my code for referencing CSS.
<?php echo $title?>-News

News


This is my config.php file.
$config [' Base_url ']= ' http://127.0.0.1/myPhpStudy/index.php/';

This is the source code after generating the page, click on the href connection display 404, I suspect the path is wrong, but I do not know where the wrong
    Create a news Item-news

News

Create a news item

Title

Text

Wsdfsfdsa

My CSS folder and header.php page are under the News folder, do not know where the wrong, please Daniel pointing Ah, I was just contact with PHP


Reply to discussion (solution)


Is this a valid path?
is index.php a catalogue?

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

"/> Try?"

"/> Try?"


I can't.

href= " " This print on the page of the connection sent out to see

href= " " This print on the page of the connection sent out to see


href= "Http://127.0.0.1/myPhpStudy/index.php/css/yangshi.css"/>

 
  

 
  


Not even this one.

The directory structure of the sticker
and point out the location of your files

Can I access http://127.0.0.1/myPhpStudy/index.php/css/yangshi.css directly on the website? is not CSS This directory restricted access?

Can I access http://127.0.0.1/myPhpStudy/index.php/css/yangshi.css directly on the website? is not CSS This directory restricted access?


Show 404 Page Not Found

The directory structure of the sticker
and point out the location of your files

The executed file is myphpstudy/index.php
Style sheet in Myphpstudy/application/css
So the path to the style sheet should be
DirName ($this->config->item (' Base_url ')). '/application/css/'

The executed file is myphpstudy/index.php
Style sheet in Myphpstudy/application/css
So the path to the style sheet should be
DirName ($this->config->item (' Base_url ')). '/application/css/'


This is not possible, this connection point is 404 Page not Found

I add the. htaccess file below the Myphpstudy and then access will appear internal Server error
Rewriteengine on
Rewriteengine on
Rewritecond $!^ (index\.php|images|css|robots\.txt)
Rewriterule ^ (. *) $/index.php/$1 [L]

Thank you, the problem has been solved, it's wampserver. One of the following configuration file errors

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    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.