开源框架LMLPHP-monkey发布强力回归WEB开发本质技术
很少有人知道 LMLPHP 框架还有一个版本,monkey 版本。其实早该出来的,只是一直没有时间来做这件事情。这回终于可以装一回逼了,LMLPHP-monkey 需要 PHP 5.3 以上版本,让那些喜欢 namespace 的人可以高大上一回。GITHUB 地址 https://github.com/leiminglin/LMLPHP-monkey
LMLPHP-monkey 让开发回归本质,不搞浮夸的东西。WEB 开发的本质更多的在于数据库的操作,我们提供了非常方便的数据库操作。Talk is cheap, show me the code,请看示例:
<?php
$dbconfig = array(
'dbconfig' => array (
'hostname' => 'localhost',
'hostport' => '3306',
'username' => 'root',
'password' => 'root',
'database' => 'lmlphp',
'charset' => 'utf8',
'dbprefix' => 'lblog_',
'persist' => false,
),
'test' => array (
'hostname' => 'localhost',
'hostport' => '3306',
'username' => 'root',
'password' => 'root',
'database' => 'lmlphp',
'charset' => 'utf8',
'dbprefix' => 'lblog_',
'persist' => false,
),
'master' => array (
'hostname' => 'localhost',
'hostport' => '3306',
'username' => 'root',
'password' => 'root',
'database' => 'lmlphp',
'charset' => 'utf8',
'dbprefix' => 'lblog_',
'persist' => false,
),
'online' => array (
'hostname' => 'localhost',
'hostport' => '3306',
'username' => 'root',
'password' => 'root',
'database' => 'lmlphp',
'charset' => 'utf8',
'dbprefix' => 'lblog_',
'persist' => false,
),
);
q('table_name')->query($sql, $params);
q('table_name')->select('*', $where, $params);
q('table_name')->find($id);
q('table_name')->getAll();
q('table_name')->updateOrAdd($arr, $where);
// ... getOne getList getCount add update del getLastId
q('table_name', 'online')->find($id);
暂无