PHP
文章平均质量分 55
qq271757232
这个作者很懒,什么都没留下…
展开
-
PHP SESSION - Redis
<?phpclass SessionRedis{ /** * @site http://www.chenliujin.com * @author chenliujin * @since 2016-01-19 * @param type $key * @param type $val */ static public function Write($key, $v原创 2016-01-21 00:29:54 · 384 阅读 · 0 评论 -
其它编码的字符转utf8编码
if (function_exists('mb_detect_encoding') && function_exists('mb_convert_encoding')) { // mb_detect_encoding isn't very reliable, to say the least // detection should still work with a suffi原创 2014-04-09 18:33:47 · 505 阅读 · 0 评论 -
get_client_ip
/** * @author chenliujin * @since 2014-04-17 */function get_client_ip(){ $checks = array( 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'H原创 2014-04-17 14:21:48 · 975 阅读 · 0 评论 -
isRobot
function isRobot($agent){ $robots = array( "bot", "abcdatos", "acme", "ahoy", "alkaline", "almaden", "amfibibot", "ananzi", "answerbus", "anthill", "appie", "appie1.1", "ar原创 2014-04-17 11:16:19 · 1046 阅读 · 0 评论 -
getClientIP
function ip_first($ips) { if (($pos = strpos($ips, ',')) != false) { return substr($ips, 0, $pos); } else { return $ips; }}function ip_valid($ips) { if (isset($ips))原创 2014-03-18 15:15:32 · 876 阅读 · 1 评论 -
FileCache
<?php/** * @author chenliujin * @since 2013-12-10 */class FileCache{ public static $path = '/tmp/filecache'; public static $app = 'default'; public static $prefix = ''; /**原创 2013-12-11 16:03:07 · 917 阅读 · 0 评论 -
php配置(php.ini)
date.timezone = "Asia/Shanghai"原创 2013-08-21 09:46:01 · 423 阅读 · 0 评论 -
trade_history
<?phpfunction trade_history_menu(){ $items = array(); $items['stock/trade_history/balance/%'] = array( 'title' => 'Balance', 'page callback' => 'shopping_car', 'page arguments' => array(3)原创 2012-04-16 18:21:37 · 475 阅读 · 0 评论 -
www.chenliujin.com
www.chenliujin.comchenliujin原创 2016-01-13 21:11:20 · 653 阅读 · 0 评论