版主 求助呀

2016-07-07 15:39 来源:www.chinab4c.com 作者:ecshop专家



我从另外服务器下到自己的电脑用wamp5调试(apache)出现下面错误:只有后台的这几个位置有问题

回答:
"; if(is_file($file)){ echo "文件: $file
"; }else{ echo "目录: $file
"; } }*/ $filename = date("m-d")."-".md5(time())."_backpic.zip"; ?>压缩文件名称:
(.zip)
> 1); } /* 初始化文件,建立文件目录, 并返回文件的写入权限. */ function startfile($path = 'faisun.zip'){ $this->gzfilename=$path; $mypathdir=array(); do{ $mypathdir[] = $path = dirname($path); }while($path != '.'); @end($mypathdir); do{ $path = @current($mypathdir); @mkdir($path); }while(@prev($mypathdir)); if($this->fp=@fopen($this->gzfilename,"w")){ return true; } return false; } /* 添加一个文件到 zip 压缩包中. */ function addfile($data, $name){ $name = str_replace('\\', '/', $name); if(strrchr($name,'/')=='/') return $this->adddir($name); $dtime = dechex($this->unix2DosTime()); $hexdtime = '\x' . $dtime[6] . $dtime[7] . '\x' . $dtime[4] . $dtime[5] . '\x' . $dtime[2] . $dtime[3] . '\x' . $dtime[0] . $dtime[1]; eval('$hexdtime = "' . $hexdtime . '";'); $unc_len = strlen($data); $crc = crc32($data); $zdata = gzcompress($data); $c_len = strlen($zdata); $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2); //新添文件内容格式化: $datastr = "\x50\x4b\x03\x04"; $datastr .= "\x14\x00"; // ver needed to extract $datastr .= "\x00\x00"; // gen purpose bit flag $datastr .= "\x08\x00"; // compression