code215 / evofw
dev-default
2015-01-30 15:11 UTC
Requires
- php: >=5.4.0
- twig/twig: *
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2020-08-09 05:01:22 UTC
README
关于
我在开始编写 lcnlegacy.com 时创建了此框架,以帮助我加快开发速度。
使用 evofw
创建一个新的配置文件
<?php
$config=array(
'default' => array(
'path'=>'inc/site/',
'database'=>array(
'default'=>array(
'driver' => 'PDO Driver'
'host'=>'localhost',
'user'=>'username',
'pass'=>'password',
'name'=>'databasename',
),
),
'default_system' => 'site', //this is the default class to call (site.php)
'autoLoadDB'=>true,
)
);
?>
创建您的默认页面
<?php
include('path_to_evofw/src/system.php');
$site=new System('Path to config file');
//The following in how I personally load pages. Will take index.php?page=site&action=test and load the action_test() in site.php
$page=$site->getVaule('page');
$action=$site->getValue('action');
$site->load($page, $action)
?>
示例
许可
我目前正在考虑将此项目放在哪个操作系统许可下。目前只要不销售代码,就可以免费使用。
帮助
没有人是完美的,我肯定还远远达不到。如果你看到你想修复的东西,请fork代码并给我发送一个pull request。