In genera sense if I create a CMS using php .Where I created and named the database in my localhost. Now if I or my clent upload the CMS in any server how will it work. because there is no database in that server.
And in my php code I wrote to create database. Now how can i create a CMS which can automatically create database and tables where client doesn't have to know about anything besides uploading the CMS.
Example: In the CMS there is a query saying (SELECT * FROM users). I named the table users which contains user information.
but If a client upload my CMS into his server how will it work. Does he have to go phpmyadmin and create a identical database like I created and named while developing the CMS.
You can create a php page that will execute some queries to create the database and tables.
But I think, it would be a good choice to ask your user to create a database(blank database) and provide the details of the hostname
, database name
, database username
and database password
, to your CMS system. So you could use this to execute the queries for creating the tables. I think, that's how most of the forums and CMS softwares do.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.