2013年11月24日

php session 垃圾回收机制

摘要: SESSION 垃圾回收机制或称过时消除机制有关消除session的几个配置:session.gc_maxlifetime session生存时间 及多长时间session过时session.gc_divisor 与 .gc_probability 合起来定义了在每个会话初始化时启动 gc(gar... 阅读全文

posted @ 2013-11-24 22:13 木子牛 阅读(242) 评论(0) 推荐(0) 编辑

2013年11月21日

关于php的 get_magic_quotes_gpc对于外部的处理

摘要: //返回未转义的外部数据function return_stripslashes($str){ if(function_exists('get_magic_quotes_gpc'))//判断get_magic_quotes_gpc是否可用,如果不可用则外部数据为被转义 { if(!get_magic_quotes_gpc())//false 没有进行转义 { return $str; } else { return stripslashes($str); } }else{ return $str; }} 阅读全文

posted @ 2013-11-21 14:48 木子牛 阅读(395) 评论(0) 推荐(0) 编辑

2013年10月19日

session_set_save_handler函数问题,在自定义的处理函数中不能调用数据库类,求解

摘要: 'localhost','dbuser'=>'root','dbpassword'=>'admin','dbname'=>'myweb','dbcharset'=>'GBK'); $dbsql->open(false,$config);}function mysql_session_close(){ global $dbsql; //$dbsql->destory_result();}function mysql_s 阅读全文

posted @ 2013-10-19 21:13 木子牛 阅读(453) 评论(0) 推荐(0) 编辑

2013年8月29日

图片处理

摘要: img_width = $imgwidth; $this->img_height = $imgheight; $this->img_quality = $imgquality; $this->img_pct = $imgpct; } function image(){ $this->__construct(); } function set($imgwidth=240, $imgheight=180, $imgquality=80, $imgpct=0){ $this->img_width = $imgwidth; $this->img_height = $ 阅读全文

posted @ 2013-08-29 15:43 木子牛 阅读(200) 评论(0) 推荐(0) 编辑

2013年7月25日

php 无限分级类

摘要: Execute('me',$sql); $tpc = ''; while($row = $dsql->GetArray('me')){ $topc[$row['id']] = $row; $topid[] = $row['id']; blc($row['id'],null); } fu... 阅读全文

posted @ 2013-07-25 16:59 木子牛 阅读(428) 评论(0) 推荐(0) 编辑

导航