Home > Backend Development > PHP Problem > What to do if php css does not load

What to do if php css does not load

藏色散人
Release: 2023-03-09 14:34:01
Original
2363 people have browsed it

The solution for php css not loading: first open the HTML document; then find the link tag that introduces the css file in the head tag; finally add "__STATIC__" in front of the value of the href attribute of the link tag.

What to do if php css does not load

The operating environment of this article: windows7 system, PHP7.1&&css3 version, DELL G3 computer

css in php is not loaded?

Solution:

First open the HTML document;

Then find the link tag that introduces the css file in the head tag;

Finally in Just add __STATIC__ in front of the value of the href attribute of the link tag.

<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0,
           maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="__STATIC__/bs/css/bootstrap.min.css">
    <script src="__STATIC__/bs/js/jquery.min.js"></script>
    <script src="__STATIC__/bs/js/bootstrap.min.js"></script>
    <title>Document</title>
</head>
<body>
 
</body>
</html>
Copy after login

View the source code in the browser:

<!doctype html> 
<html> 
    <head> 
        <meta charset="UTF-8"> 
        <meta name="viewport" 
        content="width=device-width, user-scalable=no, initial-scale=1.0,
         maximum-scale=1.0, minimum-scale=1.0"> 
        <meta http-equiv="X-UA-Compatible" content="ie=edge"> 
        <link rel="stylesheet" href="[/tp5/public/static/bs/css/bootstrap.min.css]
            (http://localhost/tp5/public/static/bs/css/bootstrap.min.css)"> 
        <script src="[/tp5/public/static//bs/js/jquery.min.js]
            (http://localhost/tp5/public/static//bs/js/jquery.min.js)"></script> 
        <script src="[/tp5/public/static//bs/js/bootstrap.min.js]
            (http://localhost/tp5/public/static//bs/js/bootstrap.min.js)"></script> 
        <title>Document</title> 
    </head> 
    <body> 
    </body> 
</html>
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if php css does not load. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template