Answer the question
In order to leave comments, you need to log in
How to import two classes if they repeat imports of the same class?
I tried to google, honestly.
Error in index.php:
Fatal error : Cannot declare class Database, because the name is already in use in /opt/lampp/htdocs/Model/Database/Database.php on line 3
Index.php file imports:
require_once($_SERVER['DOCUMENT_ROOT'] . '/Model/Email/Email.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/Model/Goods/Goods.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/Model/Database/Database.php');
include($_SERVER['DOCUMENT_ROOT'] . '/Vendor/autoload.php');
include($_SERVER['DOCUMENT_ROOT'] . '/Model/Database/Database.php');
include($_SERVER['DOCUMENT_ROOT'] . '/Model/Database/Database.php');
Answer the question
In order to leave comments, you need to log in
include_once () use and why the heck is there generally an insertion of classes when there is autoload?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question