task.php可以自动同时生成多个静态页面吗?

<?php
set_time_limit(0);
//你网站的CMS根网址,结束不要加 /
$baseCmsUrl = "https://www.jimutu.cn";
//动态主页的名称
$dmPageName = "index.php";
//静态主页的名称
$stPageName = "index.html";
//你希望多长时间更新一次,单位是秒
$mkTime = 10;
//下面是执行的代码
$tureStFile = dirname(__FILE__).'/'.$stPageName;
$ftime = @filemtime($tureStFile);
if(!file_exists($tureStFile) || ($ftime < time()-$mkTime))
{
        $body = file_get_contents($baseCmsUrl.'/'.$dmPageName);
        $fp = fopen($tureStFile, 'w');
        fwrite($fp, $body);
        fclose($fp);
}
?>

这个只能生成一个首页面,我想同时生成首页和栏目页面,
上面这个代码只是首页,可以把栏目页也同时加上吗?
//动态主页的名称
$dmPageName = "index.php";
//静态主页的名称
$stPageName = "index.html";

这样写,$dmPageName 格式:动态页名字 => 要生成的静态页名字


         set_time_limit(0);
//你网站的CMS根网址,结束不要加 /
        $baseCmsUrl = "https://www.jimutu.cn";
//动态主页的名称 格式:动态页 => 要生成的静态页名字
        $dmPageName = ["index.php" => "index.html", "list.php" => "list.html"];
//你希望多长时间更新一次,单位是秒
        $mkTime = 10;
//下面是执行的代码
        foreach ($dmPageName as $key => $val) {
            $tureStFile = dirname(__FILE__) . '/' . $val;
            $ftime = @filemtime($tureStFile);
            if (!file_exists($tureStFile) || ($ftime < time() - $mkTime)) {
                $body = file_get_contents($baseCmsUrl . '/' . $key);
                $fp = fopen($tureStFile, 'w');
                fwrite($fp, $body);
                fclose($fp);
            }
        }