挑战最棒的留言本的源码(四)
config.php文件
// 你的用户名和密码,以及数据库名,和表名,在这里一次定义!!!
// 由于怕用户名和密码被别人通过浏览器看到,所以用了php的扩展名,这样通过浏览就看不到了!!!.
$username='your_name'; //用户名
$password='your_password'; //密码
$hostname='localhost'; //主机名,一般都为localhost
$db_name='your_db_name'; //数据库名
$table_name='your_liuyan_table'; //存放留言的表名
$table_name_control='your_control_table'; //控制表名
$number_records_to_display=5; //每页显示的留言条数!
$hang_zifu_number=50; //换行的一行字符数!
// 连接数据库,在这里连好!!!
$id_link=@mysql_connect($hostname,$username,$password);
if (! $id_link) {
affy_message("The connection to the local dtabase has failed.");}
// 处理参数,以后所有参数都可以通过 $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;
}
}
// 一些出错处理函数!
function affy_footer() {
echo '

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool