gpt4 book ai didi

php - include header.php css,不会在 include footer.php 或 body 上工作

转载 作者:行者123 更新时间:2023-11-28 05:09:08 25 4
gpt4 key购买 nike

我正在尝试 require '_header.php';require '_footer.php'; 这样我就可以为我的站点创建一个动态主体。

但是,所有 CSS 都无法在正文或页脚中使用。 CSS 仅适用于页眉。

为什么会发生这种情况,如何解决?

require '_header.php';



$form_to_echo = '<div class="form_wrap"><form id="registration" action="new_user.php" method="post">

<div class="i_group"><span class="s_name">Класа:</span>
<input type="radio" id="_rad_rnk_class_h" name="rank_class" value="H"'.$_frm_selected_rank_class_h.'><label for="_rad_rnk_class_h">Хоби</label>
<input type="radio" id="_rad_rnk_class_t" name="rank_class" value="T"'.$_frm_selected_rank_class_t.'><label for="_rad_rnk_class_t">Трофеј</label>
</div>

<input type="text" id="cell_phone" name="cell_number" placeholder="Мобилен телефон" value="'.$_POST['cell_number'].'">
</div>

<div class="i_group"><span class="s_name">Крвна група:</span><br><br>
<input type="radio" id="_rad_bld_typ_a" name="blood_type" value="A"'.$_frm_selected_bld_typ_a.'><label for="_rad_bld_typ_a">A</label>
<input type="radio" id="_rad_bld_typ_b" name="blood_type" value="B"'.$_frm_selected_bld_typ_b.'><label for="_rad_bld_typ_b">B</label>
<input type="radio" id="_rad_bld_typ_ab" name="blood_type" value="AB"'.$_frm_selected_bld_typ_ab.'><label for="_rad_bld_typ_ab">AB</label>
<input type="radio" id="_rad_bld_typ_o" name="blood_type" value="O"'.$_frm_selected_bld_typ_o.'><label for="_rad_bld_typ_o">O</label>
</div>
<div class="i_group">
<input type="submit" name="submit" class="submit" value="Pегистрирај">
</div></form></div>';


if ($error_count_up != 0) {

echo $form_to_echo;

}

require '_footer.php';

当我将代码复制并粘贴到 HTML 中时,它工作得很好...


<!DOCTYPE html>
<html>


<head lang="mk">
<meta charset="utf-8">


<link rel="stylesheet" type="text/css" href="style.css">


<link rel="stylesheet" type="text/css" href="./css/font-awesome.min.css">

<title>;</title>
<style type="text/css">

</style>



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!--<script src="script.js"></script> -->


<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.12.4.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true
});
$( "#datepicker" ).datepicker( "option", "dateFormat", "dd-mm-yy" );
} );
</script>

</head>





<body>



<div id="showcase">


<div id="sw_img1"></div>
<div class="img_fade"></div>

<div class="main_wrapper">

<div id="logo"></div>


<ul id="top_nav">

<li>Правилник</li>

<li>Контакт</li>

</ul>


</div>

</div>

        <div class="test1">test</div>






</body>





</html>

最佳答案

尝试使用包含... PHP: include

关于php - include header.php css,不会在 include footer.php 或 body 上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39667323/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com