@@ -287,7 +287,8 @@ private static function getRoot() {
287
287
//Following lines of code assumes that the class exist on the folder:
288
288
//\vendor\webfiori\framework\webfiori\framework
289
289
//Its used to construct the folder at which index file will exist at
290
- $ vendorPath = '\vendor\webfiori\framework\webfiori\framework ' ;
290
+ $ DS = DIRECTORY_SEPARATOR ;
291
+ $ vendorPath = $ DS .'vendor ' .$ DS .'webfiori ' .$ DS .'framework ' .$ DS .'webfiori ' .$ DS .'framework ' ;
291
292
$ rootPath = substr (__DIR__ , 0 , strlen (__DIR__ ) - strlen ($ vendorPath ));
292
293
return $ rootPath ;
293
294
}
@@ -362,7 +363,7 @@ public static function initiate(string $appFolder = 'app', string $publicFolder
362
363
/**
363
364
* Path to WebFiori's core library.
364
365
*/
365
- define ('WF_CORE_PATH ' , ROOT_PATH .DS .'vendor\ webfiori\ framework\ webfiori\ framework ' );
366
+ define ('WF_CORE_PATH ' , ROOT_PATH .DS .'vendor ' . DS . ' webfiori ' . DS . ' framework ' . DS . ' webfiori ' . DS . ' framework ' );
366
367
}
367
368
self ::initAutoLoader ();
368
369
self ::checkStandardLibs ();
@@ -607,7 +608,8 @@ private static function initAutoLoader() {
607
608
* Initialize autoloader.
608
609
*/
609
610
if (!class_exists ('webfiori\framework\autoload\ClassLoader ' ,false )) {
610
- require_once WF_CORE_PATH .DIRECTORY_SEPARATOR .'autoload ' .DIRECTORY_SEPARATOR .'ClassLoader.php ' ;
611
+ $ autoloader = WF_CORE_PATH .DIRECTORY_SEPARATOR .'autoload ' .DIRECTORY_SEPARATOR .'ClassLoader.php ' ;
612
+ require_once $ autoloader ;
611
613
}
612
614
self ::$ AU = ClassLoader::get ();
613
615
0 commit comments