Home > Backend Development > PHP Problem > How to solve the problem that php web page cannot use css and js

How to solve the problem that php web page cannot use css and js

Release: 2023-02-27 19:34:01
Original
3144 people have browsed it

How to solve the problem that php web page cannot use css and js

href is a relative path and STATIC can be connected to solve the problem

static can also be used to define static variables and late static binding.

Since PHP 5.3.0, PHP has added a feature called late static binding, which is used to reference statically called classes in the inheritance scope.

The working principle of late static binding is to store the class name in the previous "non-forwarding call" (non-forwarding call). When making a static method call, the class name is the one explicitly specified (usually on the left part of the :: operator); when making a non-static method call, it is the class to which the object belongs.

<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 source code in browser:

| 
| | | | | | | | | | | | | | | | | | | | | | | | | | | Document | | | | | | | | | | | | | | | |
Copy after login

Recommended: php server

The above is the detailed content of How to solve the problem that php web page cannot use css and js. 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