HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/alt/php55/usr/share/doc/pear/Base/docs/tutorial_example_04.php
<?php
require 'tutorial_autoload.php';

class myProgressFinder
{
    static public function findRecursiveCallback( ezcBaseFileFindContext $context, $sourceDir, $fileName, $fileInfo )
    {
        // ignore if we have a directory, but do print a "." and sleep for
        // extra demo time
        if ( $fileInfo['mode'] & 0x4000 )
        {
            echo ".";
            usleep( 100000 );
            return;
        }

        // update the statistics
        $context->elements[] = $sourceDir . DIRECTORY_SEPARATOR . $fileName;
        $context->count++;
        $context->size += $fileInfo['size'];
    }

    static public function findRecursive( $sourceDir, array $includeFilters = array(), array $excludeFilters = array() )
    {
        // create the context, and then start walking over the array
        $context = new ezcBaseFileFindContext;
        ezcBaseFile::walkRecursive( $sourceDir, $includeFilters, $excludeFilters,
                array( 'myProgressFinder', 'findRecursiveCallback' ), $context );

        // collect the statistics (which we don't do anything with in this example)
        $statistics['size'] = $context->size;
        $statistics['count'] = $context->count;

        // return the found and pattern-matched files
        sort( $context->elements );
        return $context->elements;
    }
}

$files = myProgressFinder::findRecursive( dirname( __FILE__ ) );
var_dump( $files );
?>