简体   繁体   English

我如何使用php创建CMS,而最终用户不必了解数据库。 那可能吗

[英]How can I Create a CMS using php where end user doesn't have to know anything about database. Is that possible

In genera sense if I create a CMS using php .Where I created and named the database in my localhost. 从一般意义上讲,如果我使用php创建CMS。我在本地主机中创建并命名数据库的位置。 Now if I or my clent upload the CMS in any server how will it work. 现在,如果我或我的客户在任何服务器上上传CMS,它将如何工作。 because there is no database in that server. 因为该服务器中没有数据库。

And in my php code I wrote to create database. 在我的php代码中,我编写了创建数据库的代码。 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. 现在,我该如何创建一个CMS,该CMS可以自动创建数据库和表,而客户端除了上载CMS外无需了解其他任何信息。

Example: In the CMS there is a query saying (SELECT * FROM users). 示例:在CMS中,有一个查询(SELECT * FROM users)。 I named the table users which contains user information. 我将包含用户信息的表命名为users。

but If a client upload my CMS into his server how will it work. 但是如果客户将我的CMS上传到他的服务器中,它将如何工作。 Does he have to go phpmyadmin and create a identical database like I created and named while developing the CMS. 他是否必须去phpmyadmin并创建一个与开发CMS时创建和命名的数据库相同的数据库。

You can create a php page that will execute some queries to create the database and tables. 您可以创建一个php页面,该页面将执行一些查询以创建数据库和表。

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. 但是我认为,最好是让您的用户创建一个数据库(空白数据库),并向CMS系统提供hostnamedatabase namedatabase usernamedatabase password的详细信息。 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. 我认为,多数论坛和CMS软件都是这样做的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我无法更新mysql(i)数据库。 如何在数据库中设置用户类型? - I can't update mysql(i) database. How to setup the user type in the database? PHP从数据库创建csv。 数据库未保存,但在文件末尾添加了当前页面的htmlcode - PHP Create csv from database. The database isn't saved but it adds the htmlcode of the current page at the end of file 如何使用PHP创建数据库(如果不存在)? - How do I create a database if it doesn't exist, using PHP? 我正在尝试使用此代码将项目添加到数据库中,但它没有将它们添加到数据库中。 如何使用带有ajax的PHP代码使用POST方法? - I'm trying to use this code to add items to the database, but it doesn't add them to database. How to use POST METHOD using PHP CODE with ajax? 我无法将图像上传到数据库。 我需要知道数据库中图像表的类型 - I can't upload image to my database. I need to know the type of my image table in db 无法理解为什么此代码不起作用。 我的 sql 数据库有问题。 $sqll="SELECT * FROM netbarg WHERE r_number='02177736'" - Cannot understand why this code doesn't work. I have some trouble with my sql database. $sqll="SELECT * FROM netbarg WHERE r_number='02177736'" 我无法在数据库中插入数据。 我要去哪里错了? - I can't insert data in my database. Where I'm going wrong? 我无法更新数据库。 Symfony PHP数据库原则 - I can't update my database. symfony php database doctrine 使用PHP将数据插入数据库(错误但不插入任何内容); - Inserting data into a Database using PHP (errors but doesn't insert anything); 我可以将我的数据传递到我的数据库。 它向我显示此错误:SQLSTATE[HY000]: 一般错误:1364 字段“item_name”没有默认值 - I can pass my data to my database. It shows me this error: SQLSTATE[HY000]: General error: 1364 Field 'item_name' doesn't have a default value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM