easyphp框架1.1版本发布了

easyphp框架发布了

本次更新的内容有:
1.增加 APP_NAME 常量,为项目目录,修改 CORE 常量为ROOT_PATH

2.增加对多数据库的支持,修改config.inc.php数据库配置数据为二维,具体调用方法见附录。

3.添加初始化文件夹/文件的创建 ,只需在入口文件中定义好APP_NAME ,系统便会自动创建 APP_NAME文件夹,里面包含 controller,view,model三个文件夹和默认的 index_controller.class.php ,index_model.class.php

4.添加创建controller/model的小工具 ,只需在 当前把当前动作改为tools就可以看到其界面了,如 index.php?c=message&a=tools ,在这里可以方便的创建controller 和model了,再也不用我们复制修改了。如果该模板创建的轻拿默认模板不能满足你的需要,可以修改core/data/的模板类文件。

————————————————————————————–

说明 :

a .多数据支持的 config.inc.php 格式应该写成这样

define (‘TABLE_PRE’,'e_’);
$s_db_config = array (
1 => array (‘db_host’=>’localhost’,'db_user’=>’root’,'db_password’=>”,’db_name’=>’easyphp’,'db_charset’=>’UTF8′),
2 => array (‘db_host’=>’localhost’,'db_user’=>’root’,'db_password’=>”,’db_name’=>’test’,'db_charset’=>’UTF8′),
3 => array (‘db_host’=>’localhost’,'db_user’=>’root’,'db_password’=>”,’db_name’=>’baike’,'db_charset’=>’UTF8′),
);

注意:索引必须大于0 ,1表示数据库1的信息,2表示数据库2的信息,依次类推。
在调用时以这样的方式来调用 :

// $temp2 = $this->mod(2)->result_sql (“select * from bf_user limit 3 “);
// var_dump ($temp2);
// $temp3 = $this->mod(1)->result_sql (“inert into ##__test (id,tid,pid) values (1,2,3) “);
// var_dump ($temp3);

目前暂只支持 result_sql ,exec_sql 两种方法。

————————————————–
程序下载请点这里 easyphp 1.1
自带一个留言板的例子,方便大家入门。如发现问题,请及时联系我 .qq 121325501 谢谢。

如果你想下载更旧的版本,请查看  easyphp 框架V1.0发布了

申明:本程序仅供学习研究之用,请勿用于实际项目。


Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

*
请输入图片中的字符以验证你并非垃圾机器人. 点击图片收听验证码的语音版.
点击这里收听此验证码的语音版本