PHP code example of colaphp / utils

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

    

colaphp / utils example snippets


public function load(){} //加载文件
public function set(){} //设置
public function get(){} //获取
public function remove(){} //移除
function config() //助手函数

public static dump() //友好的变量输出.
function dump() //助手函数

public static load() //加载文件.
public static set() //设置.
public static get() //获取.
function env() //助手函数

$config = [
    'time_format' => 'c',
    //单独记录true | string
    'single'      => false,
    'file_size'   => 2097152,
    'path'        => __DIR__,
    //独立日志的类型warning|error
    'apart_level' => [],
    'json'        => false,
];
$Log = new \Colaphp\Utils\Log();
$Log->init($config);
$Log->notice('hello');
$Log->save();