")){ $flag = 0; } if($flag){ $contents1 .= $buffer; } if(strstr($buffer,"")){ $flag = 1; } } fclose($handle); } $handle = fopen($address2,"r"); $contents2 = ""; $flag = 0; if($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); if(strstr($buffer,"")){ $flag = 0; } if($flag){ $contents2 .= $buffer; } if(strstr($buffer,"")){ $flag = 1; } } fclose($handle); } $handle = fopen($address3,"r"); $contents3 = ""; $flag = 0; if($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); if(strstr($buffer,"")){ $flag = 0; } if($flag){ $contents3.= $buffer; } if(strstr($buffer,"")){ $flag = 1; } } fclose($handle); } $handle = fopen($address4,"r"); $contents4 = ""; $flag = 0; if($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); if(strstr($buffer,"")){ $flag = 0; } if($flag){ $contents4.= $buffer; } if(strstr($buffer,"")){ $flag = 1; } } fclose($handle); } $handle = fopen($address5,"r"); $contents5 = ""; $flag = 0; if($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); if(strstr($buffer,"")){ $flag = 0; } if($flag){ $contents5.= $buffer; } if(strstr($buffer,"")){ $flag = 1; } } fclose($handle); } $handle = fopen($address6,"r"); $contents6 = ""; $flag = 0; if($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); if(strstr($buffer,"")){ $flag = 0; } if($flag){ $contents6.= $buffer; } if(strstr($buffer,"")){ $flag = 1; } } fclose($handle); } if($contents1 or $contents2 or $contents3 or $contents4 or $contents5 or $contents6){ $contents = mb_convert_encoding($contents1.$contents2.$contents3.$contents4.$contents5.$contents6,"SJIS-win","EUC-JP,ASCII,JIS,UTF-8,SJIS"); }else{ $contents = "�f�[�^�Ȃ�"; } $fd = fopen ($filename, "r"); $file = fread ($fd, filesize ($filename)); fclose ($fd); //�t�@�C����u�� $file = str_replace("##DATA##",$contents,$file); //�\�� echo $file; ?>