E
E
Eugene2018-06-20 08:44:01
Yii
Eugene, 2018-06-20 08:44:01

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');

While I try to include url-manager and the server issues errors. So you need to configure .htaccess. But how?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2018-06-20
@evgen9586

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.

D
Dmitry Kim, 2018-06-20
@kimono

Fine! Now your code smells bad.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question