首页  >  文章  >  后端开发  >  php读取资料失败?

php读取资料失败?

WBOY
WBOY原创
2016-06-13 11:21:36844浏览

php读取文件失败??

	<br />$dir=opendir(ROOT_PATH."frame/hack");<br />	while($file=readdir($dir)){<br />		if(is_file(ROOT_PATH."frame/hack/$file/data.sql")){<br />			$sql=readover(ROOT_PATH."frame/hack/$file/data.sql");<br />			preg_match_all("/INSERT INTO `qb_hack`([^']+)\('([^']+)', '([^']+)'/is",$sql,$array);<br /><br />			$_array = @include(ROOT_PATH."frame/hack/$file/fix.php");<br />			if($_array[setup]==2){<br />				$_array[input]=" checked onclick='return false' ";<br />			}elseif($_array[setup]==1){<br />				$_array[input]=' checked ';<br />			}<br /><br />			$Harray[$file]=array(<br />				'name'=>implode(',',$array[3]),<br />				'input'=>$_array[input],<br />			);<br />		}<br />	}<br />    <br />    <br />//读取与写入<br />function readover($filename,$method="rb"){<br />	if([email&#160;protected]($filename,$method)){<br />		flock($handle,LOCK_SH);<br />		$filedata=fread($handle,filesize($filename));<br />		fclose($handle);<br />	}<br />	return $filedata;<br />}<br />function writeover($filename,$data,$method="rb+",$iflock=1){<br />	touch($filename);<br />	$handle=fopen($filename,$method);<br />	if($iflock){<br />		flock($handle,LOCK_EX);<br />	}<br />	$show=fputs($handle,$data);<br />	if($method=="rb+") ftruncate($handle,strlen($data));<br />	fclose($handle);<br />	return $show;<br />}





下面是前台读取格式


1a32eab3e39fe8b47a6566e73ea33848$rs){print dd25f43716e9210f378d6fd2a6e43718
25edfb22a4f469ecb59f1190150159c6ac662999acef47374cf9a3e1d516e401$rs[name]bed06894275b65c1ab86501b08a632eb