"_" . (string)($page_num-1) . ".html";$next_page_file = $partial_path . "_" . (string)($page_num+1) . ".html";
/*(string)($page_num+1)将数学运算$page_num+1的结果转化为字符串类型,这样就可以用来与其他字串最终连接成为我们需要的文件名。
*/ /*现在检查文件是否存在(这段代码假设所有的文件都位于同样的目录下),并最终给出构成页面导航栏的HTML代码。
*/ $prev_exists = file_exists($prev_page_file);$next_exists = file_exists($next_page_file);
if ($prev_exists)
{ print "<a href=http://www.webjx.com/htmldata/2006-03-16/"$root/$prev_page_file">previous</a>";if ($next_exists)
{ print " | ";} if ($next_exists)
{ print "<a href="$root/$next_page_file">next</a>";}
?>
| 对此文章发表了评论 |
