403Webshell
Server IP : 217.160.0.95  /  Your IP : 216.73.216.122
Web Server : Apache
System : Linux infong-uk56 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u78863098 ( 10368940)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/php8.4/test/MDB2/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/php8.4/test/MDB2/tests//autoload.inc
<?php

/**
 * Sets the include path, auto loader, and includes the DSN file
 *
 * @package MDB2
 * @category Database
 * @author Daniel Convissor <danielc@php.net>
 */

$dirs = array();

// Determine this directory.
$dirs['tests'] = realpath(__DIR__);

// Determine path to the MDB2 classes to be tested.
if ('./debian/ui-php8.4-pear/usr/lib/php8.4' == '@'.'php_dir'.'@') {
    // This package hasn't been installed, use parent of this dir.
    $dirs['mdb2'] = realpath((dirname(__DIR__)));
} else {
    $dirs['mdb2'] = './debian/ui-php8.4-pear/usr/lib/php8.4';
}
/**
 * Path to the MDB2 files we are testing
 */
define('MDB2_TEST_MDB2_PATH', $dirs['mdb2']);

// Determine if a current version of PHPUnit is installed.
try {
    $fi = new SplFileObject('PHPUnit/Autoload.php', 'r', true);
    unset($fi);
} catch (Exception $e) {
    try {
        $fi = new SplFileObject('PHPUnit/Framework.php', 'r', true);
        die("skip Run 'pear upgrade PHPUnit' then retry.\n");
    } catch (Exception $e) {
        die("skip Run 'pear install pear.phpunit.de/PHPUnit' then retry.\n");
    }
}

// Determine if and where MDB_Schema is installed.
try {
    $fi = new SplFileObject('MDB2/Schema.php', 'r', true);
    $dirs['mdb2_schema'] = dirname(dirname($fi->getRealPath()));
    unset($fi);
} catch (Exception $e) {
    die("skip Run 'pear install MDB2_Schema-beta' then retry.\n");
}

// Set the include path.
$dirs = array_unique($dirs);
set_include_path(implode(PATH_SEPARATOR, $dirs)
    . PATH_SEPARATOR . get_include_path());

/**
 * Automatically includes files for new classes
 */
function mdb2_test_autoload($class) {
	$class_file = str_replace('_', '/', $class) . '.php';
    try {
        $fi = new SplFileObject($class_file, 'r', true);
        require_once $fi->getPathname();
        unset($fi);
    } catch (Exception $e) {
        // Fall through, perhaps another auto loader will pick it up.
    }
}
spl_autoload_register('mdb2_test_autoload');

/**
 * Line up PHPUnit's autoloader.
 */
require_once 'PHPUnit/Autoload.php';

/**
 * Gather our functions.
 */
require_once 'functions.inc';

/**
 * Gather our database connection information.
 */
require_once 'dsn.inc';

Youez - 2016 - github.com/yon3zu
LinuXploit