所以我一直在我的网站上工作,我想在每次从 bash.org 加载页面时添加一个随机引用,我有点让它工作但我正在考虑使用“preg_replace”而不是“array_splice”摆脱页面的页眉和页脚。随着我当前使用的代码摆脱了页眉,我不知道如何摆脱页脚。请帮忙!
我目前拥有的代码
<html>
<head>
<title>Chris's Website</title>
<link href="lesson_3_css.css" type"text/css" rel="stylesheet"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css"> body, a, a:hover {cursor: url(http://q3ait.org/~bogauschc/WorkInProgress/test/proxy/cur116.cur), progress; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#FFFFFF; scrollbar-base-color:#FF9900; scrollbar-darkshadow-color:#333333; scrollbar-face-color:#FF9900; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#000000;}
body {
background-image: url(Speaker%20Fire.png);
}
.title div {
color: #F00;
}
</style>
<script language="JavaScript">
function clock(){
var time = new Date()
var hour = time.getHours()
var minute = time.getMinutes()
var second = time.getSeconds()
var ampm = " PM "
if (hour < 12){
ampm = " AM "
}
if (hour > 12){
hour -= 12
}
if (hour < 10){
hour = " " + hour
}
if (minute < 10){
min = "0" + minute
}
if (second < 10){
second = "0" + second
}
document.clockForm.clockBtn.value = hour + ":" + minute + ":" + second + ampm
setTimeout("clock()", 1000)
}
window.onload=clock;
</script>
</head>
<body>
<div class="title">
<div align="center">
<p> </p>
<td align="left"><form name="clockForm">
<input type="button" name="clockBtn" value=" " />
</form>
<a><img src="http://www.reliablecounter.com/count.php?page=bogauschc.no-ip.org&digit=style/plain/4/&reloads=0" border="2"></a>
</br>
</div>
</div>
<div class="nav">
<p><a href="http://q3ait.org/~bogauschc/html">HTML files</a></p>
<p><a href="http://turntable.fm/mayor_bees_room">My Turntable</a></p>
<p><a href="http://q3ait.org">Q3AIT</a></p>
<p><a href="http://www.chathamcentralschools.com/hs/">Chatham High</a></p>
<p><a href="http://q3ait.org/~bogauschc/WorkInProgress">Work In Progress</a></p>
<p><a href="games.html">Games</a></p>
<p><a href="webcams.html">Webcams</a></p>
</div>
<div class="main" align="center">
</br>
<p>Im Chris and I Can Do Things!</p>
<p> </p>
<?php
if(!$_GET['n']) {
$num = rand(1,400);
$open = fopen("http://bash.org/?".$num, "r");
$line = file("http://bash.org/?".$num);
array_splice($line, 0, 83);
array_splice($line, 89, 200);
foreach ($line as $line_num => $line) {
echo $line;
}
}
?>
<p> </p>
<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FChriss-Website%2F218161641601802&width=292&height=62&colorscheme=light&show_faces=false&border_color&stream=false&header=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;allowTransparency="true"></iframe>
<p> </p>
<script language="JavaScript">
VIH_BackColor = "palegreen";
VIH_ForeColor = "navy";
VIH_FontPix = "16";
VIH_DisplayFormat = "You are visiting from:<br>IP Address: %%IP%%<br>Host: %%HOST%%";
VIH_DisplayOnPage = "yes";
</script>
<script language="JavaScript" src="http://www.hashemian.com/js/visitorIP.js.php"></script>
<p><a href="IndexOf.html">Index Of Files For This Page</a></p>
</div>
</body>
</html>
这是一个 bash 引用示例http://bash.org/?47 我的网站是http://q3ait.org/~bogauschc/
这就是整个 index.php,如果您能帮助摆脱页眉和页脚,将不胜感激!
- 克里斯