Answer the question
In order to leave comments, you need to log in
How to connect once to the database?
Is it possible to connect once to the mysql database and then make any queries with this database? Now it turns out that in each .php document it is necessary to connect to the database again and again every time.
Answer the question
In order to leave comments, you need to log in
in classic php this is impossible: the script dies at the end of its work with all data and connections.
you can make a permanently living service or server, but why? there is nothing critical in "each time to connect to the database again and again" if you do not have a highload thread.
and in order not to copy-paste the connection code from a file to a file, includes and / or a single entry point are invented.
Is it possible to connect once to the mysql database and then make any queries with this database?
Depends on habit. Some people are comfortable with Debian-based distributions. (Debian, Linux Mint Debian, Ubuntu) /
Someone based on RedHat (Fedora, CentOS...)
Someone likes to "build for themselves" and takes Gentoo ... You can also Calculate ...
That is, you can list for a very long time. You can try to install one or another distribution kit in a virtual machine and watch ... In general, everything is individual ...
Linux Mint is a very user-friendly interface and suitable packages for Ubuntu.
I would suggest looking at Linux Mint. The same ubuntu, but prettier and without sudden ingenious solutions a la Unity.
Favorite distribution of a familiar Linux neighbor. Or Ubunutu (in variations)
Fedora or OpenSUSE. IMHO, the most doped ones. I have never been lucky with bubunta) as a rule, on major updates. Fake whistles are certainly buzzing, but stability is more important to me personally.
Gentoo of course. The most convenient and least time-consuming distribution to maintain.
The question is similar to “what fruit would you recommend, apples or oranges?”. To each his own, but one piece of advice - try the most popular ones, and then choose the one that suits you. Of course, it is better to start with a simple one and with a large community, like Ubuntu, it will be easier to get used to.
Ubuntu or derivatives.
Less hemorrhoids with installation and initial configuration, more prettiness, let's say briefly =)
+ huge community, a lot of faq and advice
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question