Register an autoloader function for examples.

This commit is contained in:
Daniele Alessandri
2011-02-25 12:09:45 +01:00
parent c6b8336346
commit 9f58d8a663
+7 -1
View File
@@ -1,5 +1,11 @@
<?php
require_once '../lib/Predis.php';
spl_autoload_register(function($class) {
$file = __DIR__.'/../lib/'.strtr($class, '\\', '/').'.php';
if (file_exists($file)) {
require $file;
return true;
}
});
$single_server = array(
'host' => '127.0.0.1',