我有一个网站,在那里我上传了一个index.html
完全由 HTML 代码(没有 PHP)组成的网站。
我将此代码复制到一个 PHP 文件index.php
中,此外,我将标头分隔到一个单独的 php 文件中。当我清理新的index.php
时,我只是使用了一个include()
来包含标题,如下所示:
<? include("TopNote.php"); ?>
index.html
所以和之间的区别在于index.php
HTML 代码直接在index.html
PHP 文件中,它是从一个单独的 PHP 文件中包含的。
现在index.php
文件给出了一个奇怪的按钮,index.html
它以我希望它显示的方式显示它。
index.html
:
<!doctype html>
<html lang="us">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="web/style.css">
<link href="css/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet">
<style>
.ui-menu { position: absolute; width: 100px; }
</style>
<script src="js/jquery-1.9.1.js"></script>
<script src="js/jquery-ui-1.10.3.custom.js"></script>
<script>
$(function() {
$( "#menu" ).buttonset();
$( "#regdialog" ).dialog();
$( "#buttonregister" ).click(function() {
$( "#regdialog" ).dialog( "open" );
});
});
</script>
</head>
<body bgcolor="#aaaaaa">
<img src="example.lorg" alt="" style="padding-left:20px" />
<div align="right" style="padding-right:20px">
<div>
<button id="StaffLogin">Staff Login</button>
<button id="select">Select an action</button>
</div>
<ul>
<li><a href="#">Log Out</a></li>
<li id="buttonregister"><a href="#">Register</a></li>
</ul>
</div>
<form style="margin-top: 1em;">
<div id="menu" align="center">
<input type="radio" id="buttonhome" name="radio" checked="checked"><label for="buttonhome">Home</label>
<input type="radio" id="buttonforums" name="radio"><label for="buttonforums"><a href="http://example.org">Forums</a></label>
<input type="radio" id="buttonapply" name="radio"><label for="buttonapply"><a class='fb_iframe' href="http://example.org">Apply</a></label>
<input type="radio" id="buttonabout" name="radio"><label for="buttonabout">About Us</label>
<input type="radio" id="select" name="radio">
</div>
</form>
<br />
<div class="ui-widget">
<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
<strong>Alert:</strong> The Site Is No Where Near Completed, Please go to our <a href="http://example.org/">Forums</a>
</p>
</div>
</div>
<!-- POP UP -->
<div id="regdialog" title="Register">
<form action="#" method="post">
<div class="ui-widget">
<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
Registrations are not working!
</p>
</div>
</div>
<h5>Username:</h5>
<input type="text" name="reg_name">
<h5>Password:</h5>
<input type="password" name="reg_pass">
<h5>Confirm Password:</h5>
<input type="password" name="reg_pass_conf">
<input type="submit">
</form>
</div>
</body>
</html>
index.php
:
<!doctype html>
<html lang="us">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="web/style.css">
<link href="css/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/jquery-ui-1.10.3.custom.js"></script>
</head>
<body bgcolor="#aaaaaa">
<? include("TopNote.php"); ?>
</body>
</html>
topnote.php
<!doctype html>
<html lang="us">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="web/style.css">
<link href="css/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet">
<style>
.ui-menu { position: absolute; width: 100px; }
</style>
<script src="js/jquery-1.9.1.js"></script>
<script src="js/jquery-ui-1.10.3.custom.js"></script>
<script>
$(function() {
$( "#menu" ).buttonset();
$( "#regdialog" ).dialog();
$( "#buttonregister" ).click(function() {
$( "#regdialog" ).dialog( "open" );
});
});
</script>
</head>
<body bgcolor="#aaaaaa">
<img src="example.lorg" alt="" style="padding-left:20px" />
<div align="right" style="padding-right:20px">
<div>
<button id="StaffLogin">Staff Login</button>
<button id="select">Select an action</button>
</div>
<ul>
<li><a href="#">Log Out</a></li>
<li id="buttonregister"><a href="#">Register</a></li>
</ul>
</div>
<form style="margin-top: 1em;">
<div id="menu" align="center">
<input type="radio" id="buttonhome" name="radio" checked="checked"><label for="buttonhome">Home</label>
<input type="radio" id="buttonforums" name="radio"><label for="buttonforums"><a href="http://example.org">Forums</a></label>
<input type="radio" id="buttonapply" name="radio"><label for="buttonapply"><a class='fb_iframe' href="http://example.org">Apply</a></label>
<input type="radio" id="buttonabout" name="radio"><label for="buttonabout">About Us</label>
<input type="radio" id="select" name="radio">
</div>
</form>
<br />
<div class="ui-widget">
<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
<strong>Alert:</strong> The Site Is No Where Near Completed, Please go to our <a href="http://example.org/">Forums</a>
</p>
</div>
</div>
<!-- POP UP -->
<div id="regdialog" title="Register">
<form action="#" method="post">
<div class="ui-widget">
<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
Registrations are not working!
</p>
</div>
</div>
<h5>Username:</h5>
<input type="text" name="reg_name">
<h5>Password:</h5>
<input type="password" name="reg_pass">
<h5>Confirm Password:</h5>
<input type="password" name="reg_pass_conf">
<input type="submit">
</form>
</div>
</body>
</html>
有什么区别,我该如何解决?