A _php tutorial on the process of copying data from NPC

Source: Internet
Author: User
Description
1, the People's Congress copy data processing is my own use of a set of procedures, because see the Forum on the full text of the discussion on the search, regardless of the level of the novice programming levels, but also published in the public.
2, the National People's Congress copy the full-text CD-ROM material in the University library should be available.
##### #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, " <title>$index _title</title>RN ");

Fputs ($fp _i, "

$index _title

RN ");
$dte _created=date (' y-m-d h:i:s ');
Fputs ($fp _i, "$index _describe");
Enquiry Date: $dte _createdrn ");
Fputs ($fp _i, "






<title>Database error</title>









<title>Critical Error</title>
RN "); return $fp _i; } function Mysql_error_exit ($msg) {$errno = Mysql_errno (); $error = Mysql_error (); Echo '; Echo $msg; echo "Error: ($errno) $error"; Echo '; Exit (); } function Xueroom_error_exit ($msg, $page) {echo ""; echo "

";echo "
";
Echo ";
echo $msg. "
";
echo "
Please write to xueroom@263.net to contact the administrator. ";
Echo
Return ";
Echo '';
exit-1;
}
function Xueroom_message ($msg) {
Echo '

'; Echo ' '; Echo '
';
echo "$msg";
Echo '
';
}

?>

#################### Database structure:
CREATE TABLE artical (
artical_id Int (6) not NULL auto_increment,
resource_id varchar (ten) is not NULL,
origin_periodical varchar binary not NULL,
date_pub datetime DEFAULT ' 0000-00-00 00:00:00 ' not NULL,
Artical_author varchar () binary not NULL,
Artical_title varchar (+) 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 (Ten) 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)
);

http://www.bkjia.com/PHPjc/315641.html www.bkjia.com true http://www.bkjia.com/PHPjc/315641.html techarticle Description: 1, the People's Congress copy data processing is my own use of a set of procedures, because see the Forum on the full text of the discussion on the search, regardless of the level of the Novice programming levels, also will its ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.