PHP code example of ankewk / zerophp

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

    

ankewk / zerophp example snippets


// 默认环境为开发环境
$env = getenv('APP_ENV') ?: 'dev';  // 将 'dev' 改为 'uat' 或 'prod'

conf/
├── env/
│   ├── config_dev.php    # 开发环境配置
│   ├── config_uat.php    # 测试环境配置
│   └── config_prod.php   # 生产环境配置
├── config.php            # 主配置文件,负责加载环境配置
└── route.php