PHP code example of srun / yii2-kingbase

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

    

srun / yii2-kingbase example snippets


'components' => [
    'db' => [
        'class' => \srun\yii2\kingbase\Connection::class,
        'dsn' => 'pgsql:host=127.0.0.1;port=54321;dbname=srun4k',
        'username' => 'system',
        'password' => 'secret',
        'charset' => 'utf8',
    ],
],

'components' => [
    'db' => [
        'class' => \yii\db\Connection::class,
        'dsn' => 'pgsql:host=127.0.0.1;port=54321;dbname=srun4k',
        'username' => 'system',
        'password' => 'secret',
        'charset' => 'utf8',
        'schemaMap' => [
            'pgsql' => [
                'class' => \srun\yii2\kingbase\Schema\KingbaseSchema::class,
            ],
        ],
    ],
],