PHP code example of ohworkit / sirius

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

    

ohworkit / sirius example snippets


// BASE_PATH
define('BASE_PATH', __DIR__);

// Autoload

"memcache" => array(
    "default" => array(
        "servers" => [
            array("127.0.0.1",11211,5),
            //array(host,port,weight),
        ],
        "persistent_id" => null,
        "options" => array(
            Memcached::OPT_LIBKETAMA_COMPATIBLE => true,
            Memcached::OPT_PREFIX_KEY => "sirius:"
        ),
    ),
),

"redis" => array(
     "default" => array(
         "parameters" => [
             'tcp://127.0.0.1?alias=master',
             //'tcp://10.0.0.2?alias=slave-01'
         ],
         "options" => [
             //'replication' => true,
             "prefix" => "sirius:",
         ],
     ),
 ),