config.phpÎļþ
<?php
// ÄaµÄÓû§ÃuºÍÃÜÂe,ÒÔ¼°Êý¾Ý¿aÃu,ºÍ±iÃu,ÔÚÕaÀiÒ»´Î¶¨Òa!!!
// ÓÉÓÚÅÂÓû§ÃuºÍÃÜÂe±»±ðÈËͨ¹ýa¯ÀÀÆ÷¿´µ½,ËuÒÔÓÃÁËphpµÄÀ(C)Õ¹Ãu,ÕaÑuͨ¹ýa¯ÀÀ¾Í¿´²»µ½ÁË!!!.
$username='your_name'; //Óû§Ãu
$password='your_password'; //ÃÜÂe
$hostname='localhost'; //Ö÷»uÃu,Ò»°a¶¼Îªlocalhost
$db_name='your_db_name'; //Êý¾Ý¿aÃu
$table_name='your_liuyan_table'; //´ae*ÅÁoÑԵıiÃu
$table_name_control='your_control_table'; //¿ØÖƱiÃu
$number_records_to_display=5; //ÿҳÏÔʾµÄÁoÑÔÌoÊý!
$hang_zifu_number=50; //»»ÐеÄÒ»ÐÐ×Ö*uÊý!
// Á¬½ÓÊý¾Ý¿a,ÔÚÕaÀiÁ¬ºÃ!!!
$id_link=@mysql_connect($hostname,$username,$password);
if (! $id_link) {
affy_message("The connection to the local dtabase has failed.");}
// ´¦Ài²ÎÊý,ÒÔºoËuÓвÎÊý¶¼¿ÉÒÔͨ¹ý $arr_request['name']µÃµ½,²»¹ÜÊÇpostµÄ»¹ÊÇgetµÄ!!!
$arr_request=array();
if (count($HTTP_GET_VARS)) {
while (list($key,$value)=each($HTTP_GET_VARS)) {
$arr_request[strtolower($key)]=$value;
}
}
if (count($HTTP_POST_VARS)) {
while (list($key,$value)=each($HTTP_POST_VARS)) {
$arr_request[strtolower($key)]=$value;
}
}
// Ò»Ð(C)³o´i´¦Àiº¯Êý!
function affy_footer() {
echo '