!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/lib/php/doc/HTML_Progress/docs/TDG/HTML_Progress/   drwxr-xr-x
Free 13.06 GB of 61.93 GB (21.08%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     tutorial_progress.sleep.pkg.html (8.97 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
HTML_Progress::sleep
HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next
HTML_Progress::sleep
delays execution of the progress meter

Synopsis

require_once 'HTML/Progress.php';

void HTML_Progress::sleep()

Description

This method is used to delay execution of the progress meter.

This is the default user callback called by HTML_Progress::process in the do-while loop of the HTML_Progress::run method.

Note

( HTML_Progress >= 1.2.0RC3 )

This function can not be called statically.

Useful when you want to show some demonstrations. In real world, there is no need to delay execution because the user-task (process) should be long enough to make a smooth animation. If it was not the case, then use the HTML_Progress::setAnimSpeed method.

The function http://www.php.net/manual/en/function.usleep.php did not work on Windows systems until PHP 5.0.0; For PHP4 on Windows platform, HTML_Progress uses a empty-for loop to delay execution.

See

HTML_Progress::setAnimSpeed, HTML_Progress::process, HTML_Progress::run, HTML_Progress::setProgressHandler

Example

Example below (that requires HTML_Progress >= 1.2.0RC3) demonstrates usage of a simple user callback (lines 10 to 13, and 18), which only wait 1 second (line 16).

  1. <?php
  2. require_once 'HTML/Progress.php';
  3.  
  4. /*
  5. user callback: job to do while the progress meter is running
  6.  
  7. $obj is an instance of the progress meter object (see line 13)
  8. $progressValue contains the current value of the progress meter
  9. */
  10. function myFunctionHandler($progressValue, &$obj)
  11. {
  12. $obj->sleep(); // nothing to do here, except sleep a bit ...
  13. }
  14.  
  15. $progress = new HTML_Progress();
  16. $progress->setAnimSpeed(1000); // defines delay of one second
  17. $progress->setIncrement(10);
  18. $progress->setProgressHandler('myFunctionHandler');
  19. ?>
  20. <html>
  21. <head>
  22. <style type="text/css">
  23. <!--
  24. <?php echo $progress->getStyle(); ?>
  25. // -->
  26. </style>
  27. <script type="text/javascript">
  28. <!--
  29. <?php echo $progress->getScript(); ?>
  30. //-->
  31. </script>
  32. </head>
  33. <body>
  34.  
  35. <?php
  36. echo $progress->toHtml();
  37. $progress->run();
  38. ?>
  39.  
  40. </body>
  41. </html>

Prev Up Next
HTML_Progress::toArray Reference Guide HTML_Progress::setProgressHandler

Documentation generated on Sun, 12 Sep 2004 20:23:01 +0200 by phpDocumentor 1.3.0RC3

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5458 ]--