摘要: Mysql.class.php <?php class Mysql{ protected $conn = false; //数据库连接资源 protected $sql; //sql语句 /** * 构造函数,负责连接服务器、选择数据库、设置字符集等 * @param $config string 阅读全文
posted @ 2019-01-23 08:18 周行知 阅读(200) 评论(1) 推荐(0) 编辑
摘要: 实现跳转的方法: 1.Php中header的函数 2js中location函数 3.Html中的meta函数 引入message.html <meta http-equiv="Refresh" content ="<?php echo $wait;?> ;url=<?php echo $url;?> 阅读全文
posted @ 2019-01-23 01:41 周行知 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 路由方法的设置 //路由方法 private static function dispatch(){ //获取控制器名称(类比:英文单词的后缀) $controller_name=CONTROLLER."Controller"; //获取方法名 $action_name=ACION."Action" 阅读全文
posted @ 2019-01-23 00:53 周行知 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 《电子商城实录 项目目录的结构搭建及其说明2》中方法优化 Framework.class.php代码加入static: <?php//核心启动类class Framework{ public static function run(){ echo "hello,wrold!"; } //初始化方法 阅读全文
posted @ 2019-01-23 00:16 周行知 阅读(234) 评论(0) 推荐(0) 编辑