/*(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 $root/$prev_page_file>previous</a>;if ($next_exists)
{ print | ;} if ($next_exists)
{ print <a $root/$next_page_file>next</a>;}
?>