Discuz教程网

[二次开发] 提取Discuz X2.5安装进度显示代码

[复制链接]
authicon dly 发表于 2013-1-12 21:09:12 | 显示全部楼层 |阅读模式
提取discuz安装进度显示,比如什么什么数据表创建完成,什么什么文件创建完成!
开始我也以为是ajax完成,原来不是。至于进度条什么的这个可以自由发挥。
173104_a9Lh_111529.png
  1. <html xmlns="http://www.w3.org/1999/xhtml"><head>
  2. <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  3. <title>Discuz! 安装向导</title>
  4. <style type="text/css">
  5. body{ padding:5px 0; background:#FFF; text-align:center; }
  6. body, td, input, textarea, select, button{ color:#666; font:12px/1.5 Verdana, Tahoma, Arial, 'Microsoft Yahei', 'Simsun', sans-serif; }
  7. .container{ overflow:hidden; margin:0 auto; width:700px; height:auto !important;text-align:left; border:1px solid #B5CFD9; }
  8. .main{ padding:20px 20px 0; background:#F7FBFE url(bg_repx.gif) repeat-x 0 -194px; }
  9.         .main h3{ margin:10px auto; width:75%; color:#6CA1B4; font-weight:700; }
  10. #notice { overflow: hidden; margin: 20px; padding: 5px; height: 300px; border: 1px solid #B5CFD9; text-align: left; }
  11. </style>
  12. <meta name="Copyright" content="Comsenz Inc.">
  13. </head>
  14. <body><div class="container">
  15. <div class="main"><script type="text/javascript">
  16. function showmessage(message) {
  17.         document.getElementById('notice').innerHTML += message + '<br/>';
  18.         document.getElementById('notice').scrollTop = 100000000;
  19. }
  20. </script>
  21.                 <div id="notice"></div>
  22. <?php
  23. //检测完成后显示的信息
  24. function showjsmessage($message) {
  25.         echo '<script type="text/javascript">showmessage(\''.addslashes($message).' \');</script>'."\r\n";
  26.         flush();
  27.         ob_flush();
  28. }

  29. //模拟初始化数据表
  30. for ($i = 1; $i <= 50; $i++) {
  31.         showjsmessage("建立数据表 {$i} ... 成功");
  32.         sleep(rand(0, 1));
  33. }

  34. ?>
  35. </div>
  36. </div>
  37. </body>
  38. </html>
复制代码

游客,如果您要查看本帖隐藏内容请回复



上一篇:Discuz X2.5使用PHP合并discuz用户脚本
下一篇:1314学习网签到记录贴-2013年1月13日
authicon 亘古つ守侯珊 发表于 2013-3-2 08:51:19 | 显示全部楼层
学而时习之
authicon  楼主| dly 发表于 2013-3-2 22:40:31 | 显示全部楼层
亘古つ守侯珊 发表于 2013-3-2 08:51
学而时习之

不亦说乎
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 03:28

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表