We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f77b248 commit c2b0fc2Copy full SHA for c2b0fc2
autoload.php
@@ -1,18 +1,18 @@
1
<?php
2
3
-define('BASE_PATH', dirname(__DIR__));
4
define('DS', DIRECTORY_SEPARATOR);
5
6
spl_autoload_register(function ($name) {
7
$parts = explode("\\", $name);
8
$parts = array_filter($parts);
+ array_shift($parts);
9
10
/*
11
* namespace calls
12
*/
13
14
//compose standart namespaced path to file
15
- $path = BASE_PATH . DS . implode(DS, $parts) . '.php';
+ $path = '.' . DS . implode(DS, $parts) . '.php';
16
if (file_exists($path)) {
17
require_once $path;
18
return;
0 commit comments