PHP execution progress percentage code

PHP中文网
Release: 2023-02-28 19:30:02
Original
1918 people have browsed it

PHP execution progress percentage code

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

Related articles:

How to ensure that the sum of each part is 1 when calculating percentage in PHP

php fan-shaped percentage display program code

How to calculate the percentage of the progress bar displayed at the end of voting

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template