A
A
Alexey2016-12-30 02:41:54
Yii
Alexey, 2016-12-30 02:41:54

How to change yii2 folder structure?

Tell me how to change the location of folders in the yii2 framework so that the main folders [assest, commands, controllers, config] are in the / system / folder and the / web folder remains in the root
Total will be only 2 folders in the root:
/ web
/ system

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-12-30
@qonand

to do this, you can change the connection paths of the framework, etc. in the index.php file in the web folder.
for example like this:

require(__DIR__ . '/../system/vendor/autoload.php');
require(__DIR__ . '/../system/vendor/yiisoft/yii2/Yii.php');

$config = require(__DIR__ . '/../system/config/web.php');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question