php js 动态进度条
<?php
//注意,如果是安全模式,请不要打开,如果不是安全模式,这个选项可以打开
//set_time_limit(0);
for ($i = 0; $i < 500; $i++) {
$users[] = 'Tom_' . $i;
}//end for
$width = 500; //显示的进度条长度,单位 px
$total = count($users); //总共需要操作的记录数
$pix = $width / $total; //每条记录的操作所占的进度条单位长度
$progress = 0; //当前进度条长度
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
<html>
<head>
<title>动态显示服务器运行程序的进度条</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<mce:style><!--
body, div input { font-family: Tahoma; font-size: 9pt }
--></mce:style><style mce_bogus="1"> body, div input { font-family: Tahoma; font-size: 9pt }
</style>
<mce:script language="JavaScript"><!--
function updateProgress(sMsg, iWidth)
{
document.getElementById("status").innerHTML = sMsg;
document.getElementById("progress").style.width = iWidth + "px";
document.getElementById("percent").innerHTML = parseInt(iWidth / <?php echo $width; ?> * 100) + "%";
}
// --></mce:script>
</head>
<body>
<div style="margin: 4px; padding: 8px; border: 1px solid gray; background: #EAEAEA; width: <?php echo $width+8; ?>px">
<div><font color="gray">如下进度条的动态效果由服务器端 PHP 程序结合客户端 JavaScript 程序生成。</font></div>
<div style="padding: 0; background-color: white; border: 1px solid navy; width: <?php echo $width; ?>px">
<div id="progress" style="padding: 0; background-color: #FFCC66; border: 0; width
相关文档:
本文转自我的博客:(my.unix-center.net/~xiaoshe)
http://my.unix-center.net/~xiaoshe/2010/04/19/%E4%B8%80%E4%B8%AA%E8%B6%85%E7%BA%A7%E7%AE%80%E5%8D%95%E7%9A%84php%E6%8A%95%E7%A5%A8%E7%B3%BB%E7%BB%9F%EF%BC%8C%E4%B8%8D%E4%BD%BF%E7%94%A8%E6%95%B0%E6%8D%AE%E5%BA%93/
从网上发现的一个超级简单的基于php的投 ......
1 Apache
修改 documentroot 根目录
directory 访问根目录权限
directoryindex 默认首页 ......
PHP File 文件格式
常规
对于只包含有 PHP 代码的文件,结束标志("?>")是不允许存在的,PHP自身不需要("?>"), 这样做, 可以防止它的末尾的被意外地注入相应。
重要: 由 __HALT_COMPILER() 允许的任意的二进制代码的内容被 Zend Framework 中的 PHP 文件或由它们产生的文件禁止。 这个功能的使用只对一些 ......
PHP5中增强了XML
的
支持,使用DOM
扩展了XML操作的能耐。这些函数
作为 PHP5 核心的一部分,无需被安装
即可使用。
下面的例子简单的演示了DOM对XML的操
作,详细解释请看代码
中的注释
<?
/************************************************
** & ......