code215/evofw

EVO PHP 框架

安装: 8

依赖: 0

建议: 0

安全: 0

类型:项目

dev-default 2015-01-30 15:11 UTC

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)
?>

示例

  • LoLStats - 我构建的一个网站,用于显示我从 LoLKing 收集的 LoL 数据
  • LolStats2 - 为配合新的 LoLKing 布局而升级的 LoLStats 版本

许可

我目前正在考虑将此项目放在哪个操作系统许可下。目前只要不销售代码,就可以免费使用。

帮助

没有人是完美的,我肯定还远远达不到。如果你看到你想修复的东西,请fork代码并给我发送一个pull request。