HTML, form and link use the root of the problem, I have already pictured!

Source: Internet
Author: User
Keywords Html css php apache

I think this question is more confused, I first talk about the environment,

My Server home directory is C:\AppServ\www,
I wrote a 01.php file in the main directory, which is C:\AppServ\www\01.php,
And then wrote a *.html file in a location with a form:

Then after the submission, the success!!

But

I also wrote a CSS.CSS file in the main directory, namely C:\AppServ\www\css.css;

我用
  
   导入css样式表,结果失败!但是用 
  
   导入样式表,结果成功了!

Why is the same HTML,

Then after the submission, the success!!

But

I also wrote a CSS.CSS file in the main directory, namely C:\AppServ\www\css.css;

我用
  
   导入css样式表,结果失败!但是用 
  
   导入样式表,结果成功了!

Why is the same HTML,

With action= "/01.php" is the root directory,
Import style sheet href= "/css.css" is not the root directory?

What's going on?????

First you have to make sure that your. css file has no other path mapping configuration on your Web server. If the Web server has access to the URL to do a path configuration, it may be different from the physical path of the actual file.
For example, if you use Nginx, as the server, the files that specify. css start with the C:\AppServ path:

location ~ \.css{    root C:\AppServ;}

Then you have to visit the C:\AppServ\www\css.css. Then the URL on your page is really going to use/WWW/CSS.CSS. The access path to the PHP file is not affected by this configuration.

Are you sure you are introducing CSS HTML files and CSS files in the sibling directory?

  • 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.