PHP code example of jasonweicn / miniadmin

1. Go to this page and download the library: Download jasonweicn/miniadmin 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/ */

    

jasonweicn / miniadmin example snippets



// 命名空间
const APP_NAMESPACE = 'backend';

// 是否显示错误信息
const SHOW_ERROR = true;

// 是否开启日志(生产环境建议关闭)
const LOG_ON = false;

// 是否启用布局功能
const LAYOUT_ON = true;

// 开启数据库自动连接
const DB_AUTO_CONNECT = true;

const APP_NAME = 'MiniAdmin';

const PAGE_SIZE = 10;

// 引入 MiniFramework


$database['default'] = [
    'host'          => 'localhost', //主机地址
    'port'          => 3306,        //端口
    'dbname'        => 'miniadmin', //库名
    'username'      => 'root',      //用户名
    'passwd'        => '',          //密码
    'charset'       => 'utf8mb4',   //字符编码
    'persistent'    => false        //是否启用持久连接 ( true | false )
];