当前位置: 首页 > 图文教程 > 网络编程 > PHP > 人大复印资料处理程序_补充篇

PHP
PHP XML操作类DOMDocument
php jquery 实现新闻标签分类与无刷新分页
php 来访国内外IP判断代码并实现页面跳转
php 计算两个时间戳相隔的时间的函数(小时)
php 日期时间处理函数小结
PHP strtotime函数详解
PHP 抓取新浪读书频道的小说并生成txt电子书的代码
php 空格,换行,跳格使用说明
c#中的实现php中的preg_replace
PHP 分页原理分析,大家可以看看
php 8小时时间差的解决方法小结
PHP 源代码压缩小工具
php 常用类整理
在PHP中检查PHP文件是否有语法错误的方法
PHP simple_html_dom.php+正则 采集文章代码
PHP array_push 数组函数
php 文章采集正则代码
php 需要掌握的东西 不做浮躁的人
phpMyAdmin链接MySql错误 个人解决方案
PHP 获取目录下的图片并随机显示的代码

PHP 中的 人大复印资料处理程序_补充篇


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 54 ::
收藏到网摘: n/a

说明:
1、人大复印资料的处理是本人自己使用的一套程序,因为看到论坛上有关于全文检索的讨论所以就不顾编程水平的菜鸟级差,也将其公布于公。
2、人大复印全文光盘资料在各大学图书馆应该可以取得。
######config.php3
<?
$hostname = "localhost";
$dbusername = "";
$dbname='';
$dbpassword = "";
function indexfile($index_file,$index_title,$index_describe=""){
global $added;
if($index_file==""){
$index_file="\index\temp.html";
}
elseif(file_exists($index_file)){
$added=1;
copy($index_file,$index_file.".bak");
}
$fp_i=fopen($index_file,'w+');
fputs($fp_i, "<html><head><title>$index_title</title></head><body>rn");
fputs($fp_i, "<h5>$index_title</h5>rn");
//$dte_created=date('Y-m-d H:i:s');
fputs($fp_i, "<font color='Maroon' face='楷体' size=1>$index_describe");
//查询日期:$dte_created</font><hr>rn");
//fputs($fp_i,"<table>rn");
return $fp_i;
}
function mysql_error_exit($msg) {
$errno = mysql_errno();
$error = mysql_error();
echo '<html><head><title>数据库错误</title></head><body>';
echo $msg;
echo "<br>错误: ($errno) $error<br>";
echo '</body></html>';
exit();
}
function xueroom_error_exit($msg,$page) {
echo "<HTML><HEAD><TITLE>严重错误 </TITLE></HEAD>";
echo "<BODY><table align=center cellpadding=3 cellspacing=0 width=420 style="border-style:outset; border-bottom-width:thin; border-left-width:thin;border-right-width:thin;border-top-width:thin; border-color:#fefefe;">";
echo "<TH colspan=2 bgcolor=726cc5>";
echo"<font color=white face=Arial,Helvetica size=2><CENTER>";
echo $msg."<BR>";
echo "<TR><TD align=center>请致信[email protected],与管理员联系。";
echo"<BR><TR><TD align=center><A HREF = ".$page.">返回 </A>";
echo '</body></html>';
exit -1;
}
function xueroom_message($msg) {
echo '<table>';
echo '<tr><td>';
echo "$msg";
echo '</td></tr>';
echo '</table>';
}
?>
#################### 数据库结构:
CREATE TABLE artical (
artical_id int(6) NOT NULL auto_increment,
resource_id varchar(10) NOT NULL,
origin_periodical varchar(60) binary NOT NULL,
date_pub datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
artical_author varchar(50) binary NOT NULL,
artical_title varchar(100) binary NOT NULL,
artical_data longblob NOT NULL,
artical_type varchar(6),
artical__size varchar(10),
date_reprinted datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
read_count int(10) DEFAULT '0' NOT NULL,
catalog tinyint(4) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (artical_id),
KEY artical_title (artical_title),
KEY artical_author (artical_author),
KEY origin_periodical (origin_periodical),
KEY catalog (catalog),
KEY resource_id (resource_id)
);