Home >php教程 >php手册 >PHP执行进度百分比代码

PHP执行进度百分比代码

WBOY
WBOYOriginal
2016-06-13 11:33:231070browse

 

session_start();
$zs=21;//设置任务总数
if(!isset($_SESSION['num']))
$_SESSION['num']=$zs;//赋予session变量值
$jd=$_SESSION['num']--;//进度值
echo $jd;//显示进度值
echo "<br />";
echo 100-round($jd/$zs*100)."%";//显示完成进度百分比
?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn