Skip to content

Commit c2b0fc2

Browse files
updated autoload file
1 parent f77b248 commit c2b0fc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22

3-
define('BASE_PATH', dirname(__DIR__));
43
define('DS', DIRECTORY_SEPARATOR);
54

65
spl_autoload_register(function ($name) {
76
$parts = explode("\\", $name);
87
$parts = array_filter($parts);
8+
array_shift($parts);
99

1010
/*
1111
* namespace calls
1212
*/
1313

1414
//compose standart namespaced path to file
15-
$path = BASE_PATH . DS . implode(DS, $parts) . '.php';
15+
$path = '.' . DS . implode(DS, $parts) . '.php';
1616
if (file_exists($path)) {
1717
require_once $path;
1818
return;

0 commit comments

Comments
 (0)