create rest api url to connect with mysql database(创建rest api url以连接mysql数据库)
问题描述
我想学习如何创建一个 rest api url,以便我可以使用该 url 获取信息并将其发布到我的 mysql 数据库中.
I want to learn how to create a rest api url so that I could get and post information into my mysql database using that url.
在谷歌上搜索了很多并阅读了各种文章,但没有找到任何可以学习的内容.一切都以 about apis 开始,以已经创建的 rest url 结束.
Googled alot and read various article and didnt find anything precise to learn on this. All are start with about apis and ends with already created rest urls.
有人可以帮忙吗?
如何创建我自己的 url 和授权密钥等?
How to create my own url and authorization key etc ?
提前致谢!!
推荐答案
这应该可以帮助您: https://github.com/mevdschee/php-crud-api
CRUD 代表:C阅读读读U日期D删除
CRUD stands for: Create Read Update Delete
这个 api 是用 PHP 编写的,给你一个简单而舒适的机会访问您的数据库(MySQL、SQLite 3、PostgreSQL 9 或 MS SQL Server 2012).它有据可查,而且很容易上手.
This api is written in PHP and gives you a simple and comfortable opportunity to access your database (MySQL, SQLite 3, PostgreSQL 9 orMS SQL Server 2012). Its well documented and its gonna be easy to get started.
如果您需要更多自定义的东西,而不仅仅是原始数据,您应该借助框架编写自己的 api,例如 SlimFramework,您可以在其中指定请求的方法.
If you need something more custom and not only raw data you should write your own api with help of an framework for example the SlimFramework, where you can specify the methods for requests.
因为rest apis有比GET和POST更多的方法.
Cause for rest apis there are more methods than GET and POST.
祝你好运;)
这篇关于创建rest api url以连接mysql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:创建rest api url以连接mysql数据库


基础教程推荐
- 带有WHERE子句的LAG()函数 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 带更新的 sqlite CTE 2022-01-01