Answer the question
In order to leave comments, you need to log in
How to connect variables correctly?
The application works on MVC technology. On my site, index.php connects bootstrap.php, and the latter, in turn, connects the base classes (the example is taken from Habr), in addition, I decided to include the settings file (database name, database password, etc.). It turns out that these settings are available from any file on the site, quite conveniently. I declared the settings as constants, everything worked fine, now I tried to use just a variable. When trying to access this variable from other files - an error (undefined variable).
Why can I access the content when using constants, but not when using variables?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question