oldcms是开源、简单、安全的PHP开发框架
1.程序文件组织
| istall/ /* 数据库文件、服务器Rewrite规则 */ | oldcms.sql /* 数据库文件 */ | rewrite.txt /* Rewrite规则(Apache,Ngix) */| libs/ /* Smarty程序目录 */| source/ /* 核心类库、方法 */ | class/ /* 类库 */ | Captcha.class.php /* 验证码类 */ | DB.class.php /* 数据库操作类 */ | Image.class.php /* 图片上传、缩略图类 */ | Pager.class.php /* 分页类 */ | PHPMailer.class.php /* 邮件类 */ | Smtp.class.php /* 邮件类 */ | User.class.php /* 用户类 */ | commo.php /* 公共处理页面 */ | fuctio.php /* 核心方法库 */ | global.fuc.php /* 自定义方法 */ | idex.php /* 首页 */ | logi.php /* 登录 */ | register.php /* 注册 */| themes/ /* 主题模板目录 */ | default/ | css/ | img/ | templates/ | idex.html| captcha.php /* 验证码图片显示 */| cofig.php /* 数据库配置、网站配置等 */| iit.php /* 初始化 */| idex.php /* 程序开始页 */2.使用流程
(1) 将/istall/oldcms.sql入库,如需Rewrite则按rewrite.txt重写,然后配置/cofig.php 相关数据库连接等信息。(2) 在/idex.php里修改$dos数组,同时在/source目录建立相关程序文件,访问url: /idex.php?do=idex&act=idex。(3) /themes里为Smarty调用的模板目录,结构比较简单。3.登录与注册:程序包里默认集成了登录和注册模块,如需使用请看相关文件。
4.程序安全:为了增强程序的安全,获取$_GET,$_POST,$_COOKIE等变量值时请尽量使用Val方法,具体请看/source/fuctio.php,其它获取的变量值过滤可使用StripStr方法。










评论