Home  >  Article  >  php教程  >  人大复印资料处理程序_补充篇

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

WBOY
WBOYOriginal
2016-06-21 09:03:501151browse
说明:
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, "$index_titlern");
  
fputs($fp_i, "
$index_title
rn");
//$dte_created=date('Y-m-d H:i:s');
fputs($fp_i, "$index_describe");
//查询日期:$dte_created

rn");
//fputs($fp_i,"rn");
  return $fp_i;
}

function mysql_error_exit($msg) {
      $errno = mysql_errno();
      $error = mysql_error();
      echo '数据库错误';
      echo $msg;
      echo "
错误: ($errno) $error
";
      echo '';
        exit();
         
  }
function xueroom_error_exit($msg,$page) {
    echo "严重错误 ";
    echo "
";
    echo "
";
    echo"
";
          echo $msg."
";
          echo "
请致信xueroom@263.net,与管理员联系。";
          echo"
返回 ";
          echo '';
      exit -1;
}
function xueroom_message($msg) {
    echo '';
    echo '';
    echo '
';
    echo "$msg";
    echo '
';
  }

?>

#################### 数据库结构:
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)
);



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:最省空间的计数器Next article:用PHP读取IMAP邮件