创建REST API的URL以连接MySQL数据库 [英] create rest api url to connect with mysql database

查看:258
本文介绍了创建REST API的URL以连接MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想学习如何创建一个REST API网址,以便可以使用该网址获取信息并将其发布到我的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.

在Google上搜索了很多文章,并阅读了许多文章,但没有发现任何精确的内容可以学习.所有这些都以api开头,以已经创建的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.

任何人都可以帮忙吗?

如何创建自己的网址和授权密钥等?

How to create my own url and authorization key etc ?

提前谢谢!!

推荐答案

这应该可以帮助您: https://github.com/mevdschee/php-crud-api

CRUD代表: C 真实 R ead 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 API的方法比GET和POST多.

Cause for rest apis there are more methods than GET and POST.

祝你好运;)

这篇关于创建REST API的URL以连接MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆