文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>文本文件实现文章管理代码

文本文件实现文章管理代码

时间:2007-02-17  来源:PHP爱好者

//index.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
##############################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 文本文章发布系统代码片断
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 作者:晓风残月([email protected])
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 主页: http://safebase.yeah.net
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
##############################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
require "config.php";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen ("./file/title.dat","r");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$file= fread ($fp, filesize("./file/title.dat"));
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$xindex= explode ($big,$file);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$sum = count($xindex);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$sum = $sum-1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
### 分页 ###
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if (!isset($page)) $page=1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$totalpage=ceil($sum/$pagesize);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($totalpage==0) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$totalpage=1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$page=1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$start=$pagesize*($page-1)+1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$end=$pagesize+$start;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<html>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<head>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<title>文章管理代码片断(演示)</title>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<link rel="stylesheet" type="text/css" href="css/index.css">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<script language="javascript">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
function openwin(filename)
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
{ window.open("read.php?id="+filename,"","height=500,width=600,resizable=no,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</script>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</head>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<body bgcolor="#ffffff">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="100%" border="0" cellspacing="0" cellpadding="0">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="1%"><img src="../images_php/200582211542577.gif" width="20" height="20"></td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="29%" bgcolor="#FFCC66">文本文件文章系统 Demo</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td colspan="2" bgcolor="#FFCC66">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="right"> 找到 <b><?php echo $sum;?></b> 篇</div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="14%" bgcolor="#FFCC66">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="right"><img src="../images_php/200582211542962.gif" width="20" height="20"></div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="100%" border="0" cellspacing="0" cellpadding="0">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr valign="top">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="78%" align="right">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="95%" border="0" cellspacing="0" cellpadding="0">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr valign="top">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td> <br>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($sum!=0) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
for ($start;$start<=$end;$start++) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$cont= explode($small,$xindex[$start]);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo "★<a href="javascript:openwin('$cont[2]')">$cont[0]</a> ($cont[1])<br>";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($start==$sum) break;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
else {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo "没有文章";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<br><div align="right"> 共<b><?php echo $totalpage;?></b>页 第<b><?php echo $page;?></b>页 ·<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($page!=1){
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$back=$page-1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo"<a href="$php_self?page=1">首页</a> <a href="$php_self?page=$back">上一页</a>";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($page==1){
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo"首页 上一页";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if($page!=$totalpage){
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$next=$page+1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo" <a href="$php_self?page=$next">下一页</a> <a href="$php_self?page=$totalpage">尾页</a>";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if($page==$totalpage){
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo" 下一页 尾页";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>·</div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="100%" border="0" cellspacing="0" cellpadding="0">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="3%"><img src="../images_php/200582211542202.gif" width="20" height="20"></td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="94%" bgcolor="#FFCC66">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="center">制作:晓风残月(电脑疯子) <a href="http://safebase.yeah.net" target="_blank">http://safebase.yeah.net</a></div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="3%" bgcolor="#FFCC66">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="right"><img src="../images_php/200582211542520.gif" width="30" height="20"></div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</body>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</html>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen("counter.txt","r");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$counter=fgets($fp,8);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fclose($fp);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$counter+=1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen("counter.txt","w");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fputs($fp,$counter);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fclose($fp);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo "$counter views since 2000/10/07";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// end of index.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// read.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
##############################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 文本文章发布系统代码片断
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 作者:晓风残月([email protected])
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 主页: http://safebase.yeah.net
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
##############################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
require "config.php";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen ("./file/title.dat","r");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$file= fread ($fp, filesize("./file/title.dat"));
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$xindex= explode ($big,$file);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$sum = count($xindex);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$sum = $sum-1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
### 分页 ###
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if (!isset($page)) $page=1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$totalpage=ceil($sum/$pagesize);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($totalpage==0) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$totalpage=1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$page=1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$start=$pagesize*($page-1)+1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$end=$pagesize+$start;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<html>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<head>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<title>文章管理代码片断(演示)</title>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<link rel="stylesheet" type="text/css" href="css/index.css">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<script language="javascript">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
function openwin(filename)
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
{ window.open("read.php?id="+filename,"","height=500,width=600,resizable=no,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</script>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</head>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<body bgcolor="#ffffff">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="100%" border="0" cellspacing="0" cellpadding="0">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="1%"><img src="../images_php/200582211542577.gif" width="20" height="20"></td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="29%" bgcolor="#FFCC66">文本文件文章系统 Demo</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td colspan="2" bgcolor="#FFCC66">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="right"> 找到 <b><?php echo $sum;?></b> 篇</div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="14%" bgcolor="#FFCC66">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="right"><img src="../images_php/200582211542962.gif" width="20" height="20"></div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="100%" border="0" cellspacing="0" cellpadding="0">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr valign="top">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="78%" align="right">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="95%" border="0" cellspacing="0" cellpadding="0">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr valign="top">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td> <br>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($sum!=0) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
for ($start;$start<=$end;$start++) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$cont= explode($small,$xindex[$start]);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo "★<a href="javascript:openwin('$cont[2]')">$cont[0]</a> ($cont[1])<br>";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($start==$sum) break;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
else {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo "没有文章";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<br><div align="right"> 共<b><?php echo $totalpage;?></b>页 第<b><?php echo $page;?></b>页 ·<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($page!=1){
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$back=$page-1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo"<a href="$php_self?page=1">首页</a> <a href="$php_self?page=$back">上一页</a>";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($page==1){
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo"首页 上一页";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if($page!=$totalpage){
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$next=$page+1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo" <a href="$php_self?page=$next">下一页</a> <a href="$php_self?page=$totalpage">尾页</a>";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if($page==$totalpage){
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo" 下一页 尾页";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>·</div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="100%" border="0" cellspacing="0" cellpadding="0">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="3%"><img src="../images_php/200582211542202.gif" width="20" height="20"></td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="94%" bgcolor="#FFCC66">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="center">制作:晓风残月(电脑疯子) <a href="http://safebase.yeah.net" target="_blank">http://safebase.yeah.net</a></div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="3%" bgcolor="#FFCC66">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="right"><img src="../images_php/200582211542520.gif" width="30" height="20"></div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</body>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</html>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen("counter.txt","r");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$counter=fgets($fp,8);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fclose($fp);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$counter+=1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen("counter.txt","w");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fputs($fp,$counter);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fclose($fp);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
echo "$counter views since 2000/10/07";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
文本文件实现文章管理代码(2)
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
作者:edincur 发表日期:2000年11月7日 阅读次数:125
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
--------------------------------------------------------------------------------
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
相关文章
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
? 文本文件实现文章管理代码(1)
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
? 文本文件实现文章管理代码(3)
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
//login.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
##############################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 文本文章发布系统代码片断
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 作者:晓风残月([email protected])
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 主页: http://safebase.yeah.net
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
##############################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
require "func.php";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($login) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if (check_user($name,$password)) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
setcookie ("doc[name]",$name);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
setcookie ("doc[password]",$password);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
redirect2 ("manage.php");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
else {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$message= "错误的用户名或者密码";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<html>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<head>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<title>文章管理登陆</title>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</head>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<body bgcolor="#FFFFFF">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php echo $message;?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<br>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="center"><font size="3" color="#336633"><b>管 理 登 陆</b></font> </div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<form method="post" action="<?php echo $php_self;?>">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="70%" border="1" cellspacing="0" cellpadding="1" align="center"
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
bordercolorlight="#999999" bordercolordark="#FFFFFF">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="32%" align="right">用户名:</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="68%" align="left">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<input type="text" name="name" size="16">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="32%" align="right">密码:</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="68%" align="left">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<input type="password" name="password" size="16">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="32%" align="right">&nbsp;</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="68%" align="left">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<input type="submit" name="login" value="确定">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</form>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</body>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</html>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// end of login.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// manage.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
##############################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 文本文章发布系统代码片断
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 作者:晓风残月([email protected])
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 主页: http://safebase.yeah.net
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
##############################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
require "func.php";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($login) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if (check_user($name,$password)) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
setcookie ("doc[name]",$name);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
setcookie ("doc[password]",$password);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
redirect2 ("manage.php");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
else {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$message= "错误的用户名或者密码";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<html>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<head>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<title>文章管理登陆</title>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</head>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<body bgcolor="#FFFFFF">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php echo $message;?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<br>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<div align="center"><font size="3" color="#336633"><b>管 理 登 陆</b></font> </div>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<form method="post" action="<?php echo $php_self;?>">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<table width="70%" border="1" cellspacing="0" cellpadding="1" align="center" bordercolorlight="#999999" bordercolordark="#FFFFFF">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="32%" align="right">用户名:</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="68%" align="left">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<input type="text" name="name" size="16">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="32%" align="right">密码:</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="68%" align="left">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<input type="password" name="password" size="16">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="32%" align="right">&nbsp;</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<td width="68%" align="left">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<input type="submit" name="login" value="确定">
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</td>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</tr>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</table>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</form>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</body>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
</html>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
文本文件实现文章管理代码(3)
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
作者:edincur 发表日期:2000年11月8日 阅读次数:146
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
--------------------------------------------------------------------------------
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
相关文章
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
? 文本文件实现文章管理代码(1)
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
? 文本文件实现文章管理代码(2)
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// config.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#########################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 文本文章发布系统代码片断
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 作者:晓风残月(电脑疯子) mailto:[email protected]
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 主页: http://safebase.yeah.net
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 日期: 2000/10/07
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#########################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// 说明:
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 本系统全部用文本文件实现,具有动态添加删除分类和文章功能。
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 这个版本只是一个代码片断,但是作为一般的文章系统已经够用了(你可以自己建立分类目录)。
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 如果要引用,请改动版面。但是希望您保留最下方的作者标示。这也是对作者劳动的一种尊重。
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// 如何使用:
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 在你可以运行 php 的目录下面建立一个子目录。然后不用改动任何东西把本程序全部上传到刚
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 建立的子目录下面。并且把 file 目录属性设置为 766。
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// 技巧:
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 由于这个版本不带动态添加删除分类和文章功能,如果您需要建立分类,可以建立不同的目录,
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 然后将本程序界面改动后上传到类别目录下面
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// 文件说明:
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# index.php : 主题索引
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# read.php : 文章显示
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# config.php : 配置文件
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# login.php : 管理登陆文件
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# manage.pho : 管理主界面
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# func.php : Functions
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#----------------------
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#根据需要修改下面参数
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$big="さθ"; #索引分割符
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$small="そβ"; #内容分割符
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$pagesize=15; #每页显示个数
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I

www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$admin_name="admin"; #管理员名称
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$admin_password="admin"; #管理员密码
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// end of config.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
// func.php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
<?php
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
######################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 文本文章发布系统代码片断
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 作者:晓风残月([email protected])
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 主页: http://safebase.yeah.net
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
######################################
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
require "config.php";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
function add_doc() {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
global $title, $cont, $big, $small;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$filename=time(); #用时间戳作为文件名
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$ctime=$filename;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$filename="./file/".$filename.".dat";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$time=date("Y年m月d日");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$title=htmlspecialchars($title);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$cont=htmlspecialchars($cont);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$cont=nl2br($cont);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$total[0]=$title;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$total[1]=$cont;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$total[2]=$time;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$str=join($total,$small);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen ($filename,"w");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fputs ($fp,$str); #写入文件
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fclose ($fp);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$total[0]=$title;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$total[1]=$time;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$total[2]=$ctime;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$str=join($total,$small);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$filename="./file/title.dat";
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen ($filename,"r");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$temp=fread ($fp,filesize($filename));
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$str=$big.$str.$temp;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fclose($fp);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
$fp=fopen($filename,"w"); #写入索引
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fputs ($fp,$str);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
fclose ($fp);
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
function check_user($name,$password) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
global $admin_name,$admin_password;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
if ($name==$admin_name and $password==$admin_password) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
return 1;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
else {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
return 0;
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
function redirect2($url) {
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
Header ("Location:$url");
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
}
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
?>
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
//**** End *****
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 备注
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#本代码掩饰及下载地址:http://edincur.51.net/demo/doc
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
#
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 如有引用,请表明作者和出处。
www.c hinaitpower.comlKtN5HwlcxXRLhbYQWEUCcwg0I
# 任何问题联系 [email protected]
php爱 好者站 http://www.phpfans.net 文章|教程|下载|源码|论坛.
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载