PHP进度条效果
用PHP实现进度条效果。
<?php
set_time_limit(0);
echo '<h2>正在安装,请稍后...</h2>',
'<div style="border:1px solid #000;width:500px;"><div id="progress_bar">loading...</div></div>';
for($i=1;$i<=100;$i++){
$width = '500';
$width = ceil(($i/100)*$width);
echo '<mce:script type="text/javascript"><!--
',
'var progress_bar = document.getElementById("progress_bar");',
'progress_bar.style.background="#ff0000";',
'progress_bar.style.width ="'.$width.'px";',
"progress_bar.innerHTML = '{$i}%';",
'
// --></mce:script>';
sleep(1);
flush();
}
echo 'done';
?>
相关文档:
看到同学们有不少在用php开发项目的,或许下面的资料对大家有用吧,用来学习一下也好。
收集的资料相关地址:
cubi demo site:http://dev.openbiz.cn/cubi/user/login
openBiz app cubi:http://docs.google.com/View?id=df5ktjv9_64f9fd88gf
openbiz architecture overview:
http: ......
转自 http://wiki.kuaizhanbao.com/2009/1210/245.html
basename — 返回路径中的文件名部分
chgrp — 改变文件所属的组
chmod — 改变文件模式
chown — 改变文件的所有者
clearstatcache — 清除文件状态缓存
copy — 拷贝文件
delete — 参见 unlink() 或 unset()
di ......
昨天我们实现了一个简单的搜索功能,今天我想了一下,其实还有可以改进的地址,如直接用Index.php代替Search.php。
修改Index.php文件,修改一下搜索表单
<!---搜索框--->
<!--这里的所有值前面加前缀“S_”以区分-->
<form id="form1" name="form1" method="get" action="Index.php">
&n ......
Floating point precision
It is typical that simple decimal fractions like 0.1
or
0.7
cannot be converted into their internal binary
counterparts without a small loss of precision. This can lead to
confusing
results: for example, floor((0.1+0.7)*10)
will usually
return 7
......
$_GET 变量用于收集来自 method="get" 的表单中的值。
$_GET 变量
$_GET 变量是一个数组,内容是由 HTTP GET 方法发送的变量名称和值。
$_GET 变量用于收集来自 method="get" 的表单中的值。从带有 GET 方法的表单发送的信息,对任何人都是可见的(会显示在浏览器的地址栏),并且对发送的信息量也有限制(最多 100 个 ......