时间:2021-07-01 10:21:17 帮助过:41人阅读
ob_start ();
require 'xxx.php';
$temp = ob_get_contents ();
ob_end_clean ();
$fp = fopen ( $path, 'w' );
fwrite ( $fp, $temp );
fclose ( $fp );
$total = 10;
$s = 0;
if (isset ( $_GET ['s'] )) {
$s = &$_GET ['s'];
}
$per = $s + 5; // 每次循环5条
if ($per > $total) { // 如果下次循环会超过总数,就让他只能循环到总数
$per = &$total;
}
while ( $s < $per ) {
echo ++ $s;
echo '
';
}
echo '
';
echo $s;
if ($s < $total) {
echo "";
}