4
4
4sadly2020-05-14 16:13:28
PHP
4sadly, 2020-05-14 16:13:28

Who can help with composer?

I just started using it, I don't understand use, namespaces a bit.
I need to automatically load the classes and the file that uses them and connect to the database, how can I do this correctly?
If anyone can answer in the cart, leave it in the comments

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2020-05-14
@4sadly

And what about Composer? Composer connects . Everything is described here: https://getcomposer.org/doc/01-basic-usage.md (google translate to help)
Autoloading classes/files is another matter: https://www.php.net/manual/en/language .oop5.autolo...
Well, the third namespace: https://www.php.net/manual/ru/language.namespaces.php
If you just need to include a file with classes, then the good old include and require

A
Alexander, 2020-05-14
@AleksandrB

Before reading: Matt Zandstra "PHP Objects, Patterns, and Programming Techniques." (2015)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question