Skip to content

Commit

Permalink
Update phpfm.php
Browse files Browse the repository at this point in the history
  • Loading branch information
zhblue authored Sep 29, 2024
1 parent 789d625 commit 29e911b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions trunk/web/admin/phpfm.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function getServerURL() {
function reSortFiles($directory) {
// 列出目录中的所有文件
$files = scandir($directory);

// 遍历所有文件
foreach ($files as $file) {
// 检查文件是否是.ans文件
Expand All @@ -75,12 +74,12 @@ function reSortFiles($directory) {
if (str_ends_with($file, '.in') === false ) {
continue;
}
echo "$file:<br>";
//echo "$file:<br>";
$main=basename($file,".in");
// 检查文件名是否以单个数字结尾
if (preg_match('/^[^0-9]*([0-9])$/', $main)) {
// 获取文件名中的数字
echo "...";
// echo "...";
$number = substr($main, -1);
// 获取文件名中的非数字部分
$nonNumberPart = preg_replace('/[0-9]$/', '', $main);
Expand Down

0 comments on commit 29e911b

Please sign in to comment.