Answer the question
In order to leave comments, you need to log in
I can not connect the class through Composer. Maybe I'm doing something wrong?
When connecting the class, it gives the following error:
Fatal error: Uncaught Error: Class 'application\controllers\FrontController' not found in D:\OpenServer\OSPanel\domains\forumedia\public\index.php on line 8
the connection comes from a file
<?php
use application\controllers\FrontController;
const INDEX_PAGE = 'title.php';
/* Инициализация и запуск FrontController */
$front = FrontController::getInstance();
$front->route();
/* Вывод данных */
echo $front->getBody();
Answer the question
In order to leave comments, you need to log in
1. in composer.json file:
"application\\": "application",
replace with "application\\": "application/",
2. Include in your autoload.php file:
require __DIR__.'/../vendor/autoload.php';
3. run composer commanddump-autoload
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question