PHP code example of lessok / lib

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

    

lessok / lib example snippets



ig= array (
		'dsn'=> 'mysql:host=localhost;port=3306;dbname=test',
		'user'=>'root',
		'pass'=>'',
		'options'=>array(
		    \PDO::ATTR_ERRMODE=>\PDO::ERRMODE_EXCEPTION,
	      	\PDO::ATTR_TIMEOUT => 5,
		));
$db = new \lessok\Db($config);
$ret = $db->rows("select * from user");


 = \lessok\Http::getInstance();
$url = "http://httpbin.org/ip";
$ret = $http->request($url);