Current Path: > > opt > cloudlinux > alt-php55 > root > usr > share > > doc > pear > ConsoleTools > docs
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
img | Directory | - | - | |
CREDITS | File | 229 bytes | December 18 2019 11:18:59. | |
LICENSE | File | 1570 bytes | December 18 2019 11:18:59. | |
example_input.php | File | 2705 bytes | December 18 2019 11:18:59. | |
example_menu_dialog_full.php | File | 624 bytes | December 18 2019 11:18:59. | |
example_output.php | File | 2107 bytes | December 18 2019 11:18:59. | |
example_progressbar.php | File | 3442 bytes | December 18 2019 11:18:59. | |
example_progressmonitor.php | File | 1099 bytes | December 18 2019 11:18:59. | |
example_question_dialog_collection_full.php | File | 613 bytes | December 18 2019 11:18:59. | |
example_question_dialog_factory_yesno.php | File | 461 bytes | December 18 2019 11:18:59. | |
example_question_dialog_type_full.php | File | 630 bytes | December 18 2019 11:18:59. | |
example_statusbar.php | File | 987 bytes | December 18 2019 11:18:59. | |
example_table.php | File | 2142 bytes | December 18 2019 11:18:59. | |
example_table_2.php | File | 1746 bytes | December 18 2019 11:18:59. | |
tutorial.txt | File | 24492 bytes | December 18 2019 11:18:59. | |
tutorial_autoload.php | File | 495 bytes | December 18 2019 11:18:59. | |
tutorial_example_01_output_basic.php | File | 184 bytes | December 18 2019 11:18:59. | |
tutorial_example_02_output_advanced.php | File | 657 bytes | December 18 2019 11:18:59. | |
tutorial_example_03_output_options.php | File | 755 bytes | December 18 2019 11:18:59. | |
tutorial_example_04_input_basic.php | File | 399 bytes | December 18 2019 11:18:59. | |
tutorial_example_05_input_advanced.php | File | 1133 bytes | December 18 2019 11:18:59. | |
tutorial_example_06_progressbar_basic.php | File | 271 bytes | December 18 2019 11:18:59. | |
tutorial_example_07_progressbar_advanced.php | File | 596 bytes | December 18 2019 11:18:59. | |
tutorial_example_08_statusbar.php | File | 656 bytes | December 18 2019 11:18:59. | |
tutorial_example_09_table_basic.php | File | 1088 bytes | December 18 2019 11:18:59. | |
tutorial_example_10_table_advanced.php | File | 1024 bytes | December 18 2019 11:18:59. | |
tutorial_example_11_progressmonitor.php | File | 299 bytes | December 18 2019 11:18:59. | |
tutorial_example_12_input_arguments.php | File | 1442 bytes | December 18 2019 11:18:59. | |
tutorial_example_13_dialog_question.php | File | 552 bytes | December 18 2019 11:18:59. | |
tutorial_example_14_dialog_yesnoquestion.php | File | 334 bytes | December 18 2019 11:18:59. | |
tutorial_example_15_dialog_menu.php | File | 739 bytes | December 18 2019 11:18:59. | |
tutorial_example_output_targets.php | File | 308 bytes | December 18 2019 11:18:59. |
<?php /** * Example for the usage of ezcConsoleProgressbar class. * * @package ConsoleTools * @version 1.6.1 * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved. * @license http://ez.no/licenses/new_bsd New BSD License */ require_once 'Base/src/base.php'; /** * Autoload ezc classes * * @param string $className */ function __autoload( $className ) { ezcBase::autoload( $className ); } $out = new ezcConsoleOutput(); $out->formats->red->color = "red"; // Create progress bar itself $progress = new ezcConsoleProgressbar( $out, 100, array( 'step' => 5 ) ); $progress->options->emptyChar = '-'; $progress->options->progressChar = $out->formatText('>', "red"); $progress->options->formatString = "Uploading file </tmp/foobar.tar.bz2>: %act%/%max% kb [%bar%]"; // Perform actions $i = 0; while( $i++ < 20 ) { // Do whatever you want to indicate progress for usleep( mt_rand( 20000, 2000000 ) ); // Advance the progressbar by one step ( uploading 5k per run ) $progress->advance(); } // Finish progress bar and jump to next line. $progress->finish(); $out->outputText( "Successfully uploaded </tmp/foobar.tar.bz2>.\n", 'success' ); /* OUTPUT: (sequential, will be printed into 1 line and updated in reallife) Uploading file </tmp/foobar.tar.bz2>: 5/100 kb [++#----------------------------------------------] Uploading file </tmp/foobar.tar.bz2>: 10/100 kb [+++++#-------------------------------------------] Uploading file </tmp/foobar.tar.bz2>: 15/100 kb [++++++++#----------------------------------------] Uploading file </tmp/foobar.tar.bz2>: 20/100 kb [+++++++++++#-------------------------------------] Uploading file </tmp/foobar.tar.bz2>: 25/100 kb [++++++++++++++#----------------------------------] Uploading file </tmp/foobar.tar.bz2>: 30/100 kb [+++++++++++++++++#-------------------------------] Uploading file </tmp/foobar.tar.bz2>: 35/100 kb [++++++++++++++++++++#----------------------------] Uploading file </tmp/foobar.tar.bz2>: 40/100 kb [+++++++++++++++++++++++#-------------------------] Uploading file </tmp/foobar.tar.bz2>: 45/100 kb [++++++++++++++++++++++++++#----------------------] Uploading file </tmp/foobar.tar.bz2>: 50/100 kb [+++++++++++++++++++++++++++++#-------------------] Uploading file </tmp/foobar.tar.bz2>: 55/100 kb [++++++++++++++++++++++++++++++++#----------------] Uploading file </tmp/foobar.tar.bz2>: 60/100 kb [+++++++++++++++++++++++++++++++++++#-------------] Uploading file </tmp/foobar.tar.bz2>: 65/100 kb [++++++++++++++++++++++++++++++++++++++#----------] Uploading file </tmp/foobar.tar.bz2>: 70/100 kb [+++++++++++++++++++++++++++++++++++++++++#-------] Uploading file </tmp/foobar.tar.bz2>: 75/100 kb [++++++++++++++++++++++++++++++++++++++++++++#----] Uploading file </tmp/foobar.tar.bz2>: 80/100 kb [+++++++++++++++++++++++++++++++++++++++++++++++#-] Uploading file </tmp/foobar.tar.bz2>: 85/100 kb [++++++++++++++++++++++++++++++++++++++++++++++++#] Uploading file </tmp/foobar.tar.bz2>: 90/100 kb [++++++++++++++++++++++++++++++++++++++++++++++++#] Uploading file </tmp/foobar.tar.bz2>: 95/100 kb [++++++++++++++++++++++++++++++++++++++++++++++++#] Uploading file </tmp/foobar.tar.bz2>: 100/100 kb [++++++++++++++++++++++++++++++++++++++++++++++++#] Uploading file </tmp/foobar.tar.bz2>: 100/100 kb [++++++++++++++++++++++++++++++++++++++++++++++++#]Successfully uploaded </tmp/foobar.tar.bz2>. */ ?>
SILENT KILLER Tool