php 仿Comsenz安装效果代码打包提供下载

2019-04-09 21:07:19王振洲

</div>
<?php
}
function runquery() {
for($i=1;$i<=15;$i++)
{
$this->showjsmessage('执行操作'.' '.$i.' ... '.'成功');
//模拟每执行完一个动作的延时
sleep(1);
}
}
function showjsmessage($message) {
echo '<script type="text/javascript">showmessage(''.addslashes($message).' ');</script>'."rn";
flush();
ob_flush();
}
function show_footer($quit = true) {
echo <<<EOT
<div class="footer">©2001 - 2010 <a href="//www.jb51.net/">甜心</a> 瑶瑶说杀很大.</div>
</div>
</div>
</body>
</html>
EOT;
$quit && exit();
}
}

调用方法:

header('Content-Type: text/html; charset=utf-8');
include('step.inc.php');
$step=new StepClass();
//显示页面头部
$step->show_header();
//显示操作进度
$step->show_install();
//运行操作
$step->runquery();
echo '<script type="text/javascript">document.getElementById("laststep").disabled=false;document.getElementById("laststep").value = '执行完所有操作,进入下一步';</script>'."rn";
//显示页面尾部
$step->show_footer();

完整的demo:stepdemo.rar

相关文章 大家在看