PHP code example of beansir / newx-console

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

    

beansir / newx-console example snippets


#!/usr/bin/env php

defined('PROJECT_PATH') or define('PROJECT_PATH', __DIR__);
 


return [
    'app' => [
        'timezone' => 'Asia/Shanghai', // 时区
    ],
    'database' => [
        'default' => [
            'host'      => '127.0.0.1',
            'user'      => 'user',
            'password'  => 'password',
            'db'        => 'db',
            'type'      => 'mysqli'
        ],
    ],
];