zhujing666 发表于 2013-5-16 03:48:30

看帖子的都发表一下看法

double123 发表于 2013-5-16 03:49:59

官方又乱来了。

冒险冰雷 发表于 2013-5-16 03:52:12

function write_static_cache($cache_name,$caches,$newname='',$newfile='')
{
      $cache_file_path = ROOT_PATH . '/temp/static_caches/' . $cache_name . '.php';

      if(empty($newname))
                $newname = $cache_name;
      if(empty($newfile))
                $newfile = $cache_file_path;
      
      if (!empty($cache_name)){
                if ((DEBUG_MODE & 2) == 2)
                {
                        return false;
                }
                $content = &quot;<?phprn&quot;;
                $content .= &quot;$data = &quot; . var_export($caches, true) . &quot;;rn&quot;;
                $content .= &quot;?>&quot;;
                file_put_contents($cache_file_path, $content, LOCK_EX);
      }else{
                @file_put_contents($newfile, $newname);
      }
}

改为此代码即可,是由于没有加默认值,且老程序只写了两个参数的问题。不知道我写的对不对哈,PHP不支持函数的重载。。。郁闷!

nj6481232 发表于 2013-5-16 03:53:36

根据你的方法,问题解决了
页: 1 [2]
查看完整版本: 升级507补丁后出错,,