摘要: 创建2张用户表user、user2,表结构相同,但user表使用InnoDB存储引擎,而user2表则使用 MyISAM存储引擎。-- Table "user" DDLCREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `age` tinyint(4) DEFAULT NULL, `nickname` varchar(50) DEFAULT NULL, PRIMARY KE 阅读全文
posted @ 2012-10-24 21:46 Old 阅读(575) 评论(0) 推荐(0) 编辑
摘要: 修改密码passwd root网卡添加IP地址ifconfig eth0:1 184.82.167.219 netmask 255.255.255.248ifconfig eth0:2 184.82.167.220 netmask 255.255.255.248重启rebotshutdown -r now #立刻重启(root用户使用)shutdown -r 10 #过10分钟自动重启(root用户使用)shutdown -r 20:35 #在时间为20:35时候重启(root用户使用)如果是通过shutdown命令设置重启的话,可以用shutdown -c命令取消重启关... 阅读全文
posted @ 2012-10-24 13:30 Old 阅读(521) 评论(0) 推荐(0) 编辑
摘要: Magic MethodsThe function names__construct(),__destruct(),__call(),__callStatic(),__get(),__set(),__isset(),__unset(),__sleep(),__wakeup(),__toString(),__invoke(),__set_state()and__clone()are magical in PHP classes.You cannot have functions with these names in any of your classes unless you want the 阅读全文
posted @ 2012-10-24 11:35 Old 阅读(519) 评论(0) 推荐(0) 编辑
摘要: Factory定义:<?phpclass Example{ // The factory method public static function factory($type) { if (include_once 'Drivers/' . $type . '.php') { $classname = 'Driver_' . $type; return new $classname; } else { throw new Exception ('Driver not found')... 阅读全文
posted @ 2012-10-24 10:50 Old 阅读(407) 评论(0) 推荐(0) 编辑