COMPOSER_PATH error on multi app |
Hi all.
I've try to develop multi app using one Installation. Public folder, vendor folder, tests folder, writeable folder, etc, is used by all apps. Just app folder and .env file I put into different folder. So the folder structure like image below. Code: /_bar This is the code on spark file line 44 Code: require realpath('_bar/app/Config/Paths.php') ?: '_bar/app/Config/Paths.php'; This is the code on public/index.php line 15 - 66 Code: $location = (substr($_SERVER['HTTP_HOST'], 0, 9) == 'localhost') ? 'local' : 'hosting'; It's work, but composer didn't load If I change the COMPOSER_PATH on Constants file This is the code for _bar/app/Config/Constants.php line 26 Code: defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . '../vendor/autoload.php'); I got error: Code: Fatal error: Uncaught Error: Class 'Config\App' not found in D:\_DEV\PHP - CI4\multiapp\vendor\codeigniter4\framework\system\bootstrap.php:158 Stack trace: #0 D:\_DEV\PHP - CI4\multiapp\public\index.php(73): require() #1 D:\_DEV\PHP - CI4\multiapp\vendor\codeigniter4\framework\system\Commands\Server\rewrite.php(45): require_once('D:\\_DEV\\PHP - C...') #2 {main} thrown in D:\_DEV\PHP - CI4\multiapp\vendor\codeigniter4\framework\system\bootstrap.php on line 158 Full code on my github: https://github.com/itutu-media/multiapp Please help. Regards, Itutu Media |
Welcome Guest, Not a member yet? Register Sign In |