你正在使用什么文本编辑器?因为即时通讯使用记事本+ +和我基本上建立一个头文件中的广告只是调用,在例如HTML代码的顶部:
header.php文件
<html>
<head>
</head>
<body>
<div class="login" style="width:101%;">
Username: <input type="text" name="uname"><br>
Password: <input class="align" style="margin-left:3px;" type="password" name="pword"><br>
<input class="button" type="button" onclick = "location.href = 'registration.php'" name="signin" value="Sign In">
<a href = "registration.php"><input class="button" type="button" name="register" value="Sign Up"></a>
<center>
<img src = "img/LOGO.jpg" style = "height: 80px; margin-top: -80px; width: 510px;">
</center>
</div>
<center>
<div class="nav">
<ul>
<li><button onclick = "location.href = 'welcome.php'"><a href="welcome.php">Welcome</a></button></li>
</ul>
<ul>
<li><button onclick = "location.href = 'hotel.php'"><a href="hotel.php">Hotel</a></button></li>
</ul>
<ul>
<li><button onclick = "location.href = 'room.php'"><a href="Room.php">Rooms</a></button></li>
</ul>
<ul>
<li><button onclick = "location.href = 'contactus.php'"><a href="contactUs.php">Contact Us</a></button></li>
</ul>
<ul>
<li><button onclick = "location.href = 'gallery.php'"><a href="gallery.php">Gallery</a></button></li>
</ul>
</div>
</center>
</body>
</html>
我用这个PHP代码调用该文件对我的其他网页:
<?php
include('templates/header.php');
?>
我的头只是停留在页面顶部的我不知道,如果我知道你想发生什么,但是这是我的猜想希望它可以帮助FYI我只是个新手:)