What is the server used? Can data be saved? So what is the difference with the database? For example, the user's profile picture is stored on the server. I don't know what the server is. in my mind, there is no concept. I know that the database stores things. it seems that the database cannot save pictures. if the server what can I do if I want to store things in a database?
Reply to discussion (solution)
1. the database can store images (in binary format), but it is usually not done by others, which occupies too much space.
2. the general practice is to put the image on a single server and store the image path in the database.
3. there are many types of servers: database servers and Apache (web servers.
4. Instructions on Apache + php + mysql:
Client browser ------ request ----- Apache server ----- communicate with php ------ php dynamically calls MySQL database (add, delete, modify, query, etc)
1. the database can store images (in binary format), but it is usually not done by others, which occupies too much space.
2. the general practice is to put the image on a single server and store the image path in the database.
3. there are many types of servers: database servers and Apache (web servers.
4. Instructions on Apache + php + mysql:
Client browser ------ request ----- Apache server ----- communicate with php ------ php dynamically calls MySQL database (add, delete, modify, query, etc)
Still do not understand the role of the server
I am also a newbie. I want to help you with my understanding.
The server is like chopsticks, and the database is like a dish of food. The website program is like a person.
People use chopsticks to hold the dishes on the plate.
As for saving images on the server, it should be saved on the server host (if there are any mistakes, please help me correct them)
What does the database do if the server that the landlord says can save things? The database is used to store data, so that we can directly call it. if the landlord learns a bit more, he should naturally understand it.
Even if the image is saved on the server, its address is saved to the database and then called through the address.