Home  >  Article  >  Backend Development  >  PHP设置进度条的方法_PHP

PHP设置进度条的方法_PHP

WBOY
WBOYOriginal
2016-05-30 08:45:31768browse

本文实例讲述了PHP设置进度条的方法。分享给大家供大家参考。具体如下:





<?php if (ob_get_level() == 0) { ob_start(); } echo str_pad('Loading... ',4096)."
\n"; for ($i = 0; $i < 25; $i++) { $d = $d + 11; $m=$d+10; //This div will show loading percents echo '
' . $i*4 . '% complete
'; //This div will show progress bar echo '
'; flush(); ob_flush(); sleep(1); } ob_end_flush(); ?>
Done.

希望本文所述对大家的php程序设计有所帮助。

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