mirror of
https://github.com/Respect/Validation.git
synced 2026-03-15 06:45:44 +01:00
28 lines
831 B
PHP
28 lines
831 B
PHP
<?php
|
|
|
|
date_default_timezone_set('UTC');
|
|
|
|
$pear_path = trim(`pear config-get php_dir`);
|
|
set_include_path('../library' . PATH_SEPARATOR . $pear_path . PATH_SEPARATOR . get_include_path());
|
|
|
|
echo get_include_path();
|
|
|
|
/**
|
|
* Autoloader that implements the PSR-0 spec for interoperability between
|
|
* PHP software.
|
|
*/
|
|
spl_autoload_register(
|
|
function($className) {
|
|
$fileParts = explode('\\', ltrim($className, '\\'));
|
|
|
|
if (false !== strpos(end($fileParts), '_'))
|
|
array_splice($fileParts, -1, 1, explode('_', current($fileParts)));
|
|
|
|
$file = implode(DIRECTORY_SEPARATOR, $fileParts) . '.php';
|
|
|
|
foreach (explode(PATH_SEPARATOR, get_include_path()) as $path) {
|
|
if (file_exists($path = $path . DIRECTORY_SEPARATOR . $file))
|
|
return require $path;
|
|
}
|
|
}
|
|
);
|