Skip to content

Commit

Permalink
Update App.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Dec 18, 2024
1 parent c7964a6 commit 1b93ccb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions webfiori/framework/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ private static function getRoot() {
//Following lines of code assumes that the class exist on the folder:
//\vendor\webfiori\framework\webfiori\framework
//Its used to construct the folder at which index file will exist at
$vendorPath = '\vendor\webfiori\framework\webfiori\framework';
$DS = DIRECTORY_SEPARATOR;
$vendorPath = $DS.'vendor'.$DS.'webfiori'.$DS.'framework'.$DS.'webfiori'.$DS.'framework';
$rootPath = substr(__DIR__, 0, strlen(__DIR__) - strlen($vendorPath));
return $rootPath;
}
Expand Down Expand Up @@ -362,7 +363,7 @@ public static function initiate(string $appFolder = 'app', string $publicFolder
/**
* Path to WebFiori's core library.
*/
define('WF_CORE_PATH', ROOT_PATH.DS.'vendor\webfiori\framework\webfiori\framework');
define('WF_CORE_PATH', ROOT_PATH.DS.'vendor'.DS.'webfiori'.DS.'framework'.DS.'webfiori'.DS.'framework');
}
self::initAutoLoader();
self::checkStandardLibs();
Expand Down Expand Up @@ -607,7 +608,8 @@ private static function initAutoLoader() {
* Initialize autoloader.
*/
if (!class_exists('webfiori\framework\autoload\ClassLoader',false)) {
require_once WF_CORE_PATH.DIRECTORY_SEPARATOR.'autoload'.DIRECTORY_SEPARATOR.'ClassLoader.php';
$autoloader = WF_CORE_PATH.DIRECTORY_SEPARATOR.'autoload'.DIRECTORY_SEPARATOR.'ClassLoader.php';
require_once $autoloader;
}
self::$AU = ClassLoader::get();

Expand Down

0 comments on commit 1b93ccb

Please sign in to comment.