|
@@ -46,10 +46,10 @@ class Autoloader
|
|
|
{
|
|
|
$class_path = str_replace('\\', DIRECTORY_SEPARATOR, $name);
|
|
|
if (strpos($name, 'Aliyun\\OTS\\') === 0) {
|
|
|
- $class_file = __DIR__ . substr($class_path, strlen('Aliyun\\OTS')) . '.php';
|
|
|
+ $class_file = __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . substr($class_path, strlen('Aliyun\\OTS')) . '.php';
|
|
|
} else {
|
|
|
if (self::$_autoloadRootPath) {
|
|
|
- $class_file = self::$_autoloadRootPath . DIRECTORY_SEPARATOR . $class_path . '.php';
|
|
|
+ $class_file = self::$_autoloadRootPath . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . $class_path . '.php';
|
|
|
}
|
|
|
if (empty($class_file) || !is_file($class_file)) {
|
|
|
$class_file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . "$class_path.php";
|
|
@@ -65,6 +65,6 @@ class Autoloader
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-require_once(__DIR__ .'/ProtoBuffer/pb_message.php');
|
|
|
-require_once( __DIR__ . '/ProtoBuffer/pb_proto_ots.php');
|
|
|
+require_once(__DIR__ .'/src/ProtoBuffer/pb_message.php');
|
|
|
+require_once( __DIR__ . '/src/ProtoBuffer/pb_proto_ots.php');
|
|
|
spl_autoload_register('\Aliyun\OTS\Autoloader::loadByNamespace');
|