我正在创建一个家庭作业网站,它将有多个页面。我正在使用引导4,对于每个页面,我必须在HTML的头上声明大量的链接和脚本。
我的问题是,是否可以通过HTML或possible添加一个链接,这样我就可以对所有添加的内容使用一行,并在单个文件中编辑它们。
,这就是我的
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="stylesheet.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>,我想要像这样的东西
<head>
<title> </title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="alltheotherlinksandscripts.php">
</head>还是这个
<html>
<head>
<title></title>
<?php
include_once "alllinks.php";
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body> </body>
</html>发布于 2019-08-16 11:47:59
是的,您可以在一个文件(如alllinks.php )中设置所有链接(js/css库)
然后调用<head>部件中的文件,就像..。
<head>
<?php include('alllinks.php'); ?>
</head>https://stackoverflow.com/questions/57523980
复制相似问题