Update list.php

This commit is contained in:
NC 2023-08-09 11:31:25 +08:00 committed by GitHub
parent 1b8f6027b7
commit 884680cf19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,22 +1,15 @@
<?php <?php
header(Content-Type: text/json;charset=UTF-8); header('Content-Type: text/json;charset=UTF-8');
$dir=dirname(__FILE__); $dir=dirname(__FILE__);
$files = glob(./list/*.txt); $files = glob('./list/*.txt');
$result='';
foreach ($files as $file) {
$result=; $fsize=filesize($file);
foreach ($files as $file) { $myfile = fopen($file, "r") or die("Unable to open file!");
$txt= fread($myfile,$fsize);
$fsize=filesize($file); fclose($myfile);
$txt=$txt."\r\n";
$myfile = fopen($file, “r”) or die(“Unable to open file!); $result=$result.$txt;
$txt= fread($myfile,$fsize); }
fclose($myfile); echo $result;
$txt=$txt.“\r\n”; ?>
$result=$result.$txt;
}
echo $result;
?>