摘要: 第一种方式:在每个超链接上添加一个PHPSESSID=$sid//防止返回初始页产生新的session if(isset($_GET["PHPSESSID"])){ session_id($_GET["PHPSESSID"]); } //启动一个session session_start(); //获取当前session的session_id() $sid=session_id(); //在每个链接上添加参数PHPSESSID=$sid其他页面的获取方式为: if(isset($_GET["PHPSESSID"])){ //设置当前的 阅读全文
posted @ 2012-11-28 13:20 kaili 阅读(224) 评论(0) 推荐(0)
摘要: 1 replace 函数即可批量改变某字段中的某一段字符串 2 3 查 mysql 里的 replace 函数 4 update `xxx` set `a` = replace(`a` , '要替换的' , '替换为的') where xxx 5 ===PHPCHINA.COM=============================================================== 6 7 update `xxx` set `a` = replace(`a` , '要替换的' , '替换为的') where x 阅读全文
posted @ 2012-09-28 14:07 kaili 阅读(198) 评论(0) 推荐(0)
摘要: 1 <?php 2 class War3 3 { 4 5 protected static $_instance = null; 6 7 private function __construct() 8 9 {10 11 echo "War3 is Running.","<br />";12 13 }14 15 public static function runWar()16 17 {18 19 if (null === self::$_instance) {20 21 self:... 阅读全文
posted @ 2012-09-27 21:36 kaili 阅读(102) 评论(0) 推荐(0)