Programming/php
PECL PHP REDIS client library phpredis
URL : https://github.com/phpredis/phpredis#classes-and-methods
redis.ini file in /etc/php5/conf.d with the following contents: extension=redis.so
[PHP] Sample code : Berkeley DB , bdb , dba_open , db4 , key-value database ,
$id = dba_open("bdb4_tsid.db", "w", "db4"); if (!$id) { echo "dba_open failed\n"; exit; } dba_replace("key", "This is an example!", $id); if (dba_exists("key", $id)) { echo dba_fetch("key", $id); dba_delete("key", $id); } dba_close($id);
This is an example! exist: This is an example! ---> This is an example!
PHP Regex Validation of Hexadecimal Values / check hex number
preg_match( '/^[A-F0-9]{15,18}/',$v)
PHP 的 mktime , time format , 週編號 , week number of year, weeks starting on Monday
1419696000 52 - 2014-12-29 00:00:00 52 - 2014-12-30 00:00:00 52 - 2014-12-31 00:00:00 00 - 2015-01-01 00:00:00 00 - 2015-01-02 00:00:00 00 - 2015-01-03 00:00:00 00 - 2015-01-04 00:00:00 01 - 2015-01-05 00:00:00 01 - 2015-01-06 00:00:00 01 - 2015-01-07 00:00:00