个人网页(github)的留言板终于搞定了。总之后端的东西不会写,只有修改以前教程里面的文件。记录一下重要的过程。
$returnData = array( ‘cid‘ => $this->db->getInsertId(), // ‘uid‘ => $_COOKIE[‘uid‘], // ‘username‘ => $_COOKIE[‘username‘], ‘name‘ => $name, ‘email‘ => $email, ‘msg‘ => $msg, ‘time‘ => $time, ‘dateline‘ => $dateline, );
CREATE TABLE `contents` ( `cid` int(11) unsigned NOT NULL AUTO_INCREMENT, `uid` int(11) unsigned DEFAULT NULL, `name` varchar(2000) DEFAULT NULL, `email` varchar(2000) DEFAULT NULL, `msg` varchar(2000) DEFAULT NULL, `time` varchar(2000) DEFAULT NULL, `dateline` int(10) unsigned DEFAULT ‘0‘, `support` int(11) unsigned DEFAULT ‘0‘, `oppose` int(11) unsigned DEFAULT ‘0‘, PRIMARY KEY (`cid`), KEY `name` (`name`), KEY `email` (`email`), KEY `msg` (`msg`), KEY `time` (`time`), KEY `oppose` (`oppose`), KEY `uid` (`uid`), KEY `support` (`support`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
$_CONFIGS = array( ‘db‘ => array( ‘db_host‘ => ‘w.rdc.sae.sina.com.cn:3307‘, ‘db_port‘ => ‘3307‘, ‘db_user‘ => ‘xxxxxxxxx‘, ‘db_password‘ => ‘xxxxxxxxxxxxxxx‘, ‘db_name‘ => ‘xxxxxxxx‘, ),
原文:http://www.cnblogs.com/eoff/p/5164725.html