PHP code example of wycto / phpframe

1. Go to this page and download the library: Download wycto/phpframe library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wycto / phpframe example snippets



return [
    // 应用调试模式
    'debug' => true,
    //error_reporting错误级别
    'error_reporting' => 0,
    // 是否多应用
    'multi_module'       => true,
    // 默认时区
    'default_timezone'       => 'PRC',
    // 控制器类后缀
    'controller_suffix'      => 'Controller',
    // 默认模块名
    'default_module'         => 'index',
    // 禁止访问模块
    'deny_module_list'       => ['common'],
    // 默认控制器名
    'default_controller'     => 'index',
    // 默认操作名
    'default_action'         => 'index',
    // 默认的空控制器名
    'empty_controller'       => 'Error',
    // 操作方法前缀
    'use_action_prefix'      => false,
    // 操作方法后缀
    'action_suffix'          => 'Action',
    //过滤器,填写过滤函数名称,多个用英文逗号分隔
    'default_filter' => ''
];


    
    return [
        // 数据库类型
        'type'            => 'mysql',
        // 数据库连接DSN配置
        'dsn'             => '',
        // 服务器地址
        'hostname'        => '127.0.0.1',
        // 数据库名
        'database'        => 'qiheqihui',
        // 数据库用户名
        'username'        => 'root',
        // 数据库密码
        'password'        => 'root',
        // 数据库连接端口
        'hostport'        => '',
        // 数据库编码默认采用utf8
        'charset'         => 'utf8',
        // 数据库表前缀
        'prefix'          => 'cto_',
        //是否持久化
        'persistent' => true
    ];