Answer the question
In order to leave comments, you need to log in
How to make cnc correctly?
I solved the issue with the Web folder moving to a higher level.
I put the framework files in a folder and raised them a level higher.
Well, I blocked this folder with the .htaccess file
And in index.php, I just added the folder.
<?php
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require(__DIR__ . '/frm/vendor/autoload.php');
require(__DIR__ . '/frm/vendor/yiisoft/yii2/Yii.php');
$config = require(__DIR__ . '/frm/config/web.php');
Answer the question
In order to leave comments, you need to log in
you have a publicHtml folder or something like that (site root). The contents of the web folder should be there. Everything else is a level up. I would make a framework folder and put it there (in this case, you will have to correct the path in index.php).
What you are doing is very bad.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question