安装使用RESTful 框架SLIM方法
相关框架:
http://www.golaravel.com 是一个PHP框架,内置名为LUMEN的RESTful API框架,有中文文档, http://lumen.golaravel.com/docs/ https://apigility.org / 是基于ZEND框架的RESTful API框架 。 https://github.com/anandkunal/ToroPHP Toro is a PHP router for developing RESTful web applications and APIs. It is designed for minimalists who want to get work done. https://github.com/yiisoft/yii2/ Yii PHP Framework Version 2 , a modern PHP framework designed for professional Web development.
SLIM依赖composer来安装,不用composer安装还蛮困难的,没找到教程。经过一翻折腾后,我找到简便的安装方式了。
先去 https://getcomposer.org 下载 composer.phar
composer.phar 是一个PHP的压缩包,可直接运行,不需要想办法解开。
用
php composer.phar require slim/slim "^3.0"
代替 https://github.com/slimphp/Slim 的说明书中提到的:
$ composer require slim/slim "^3.0"
这样相关的依赖包都安装上了:
$ php composer.phar require slim/slim "^3.0"
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing container-interop/container-interop ( 1.1.0 )
Loading from cache
- Installing nikic/fast-route ( v1.0.1 )
Loading from cache
- Installing psr/http-message ( 1.0.1 )
Loading from cache
- Installing pimple/pimple ( v3.0.2 )
Loading from cache
- Installing slim/slim ( 3.5.0 )
Downloading: 100%
Writing lock file
Generating autoload files
gongzuola:myfavor.link zola$
这样就安装好了。
把sample 文件夹里的index.php 和 .htaccess复制到根目录下就可以测试了。
要让API工作起来,就需要写对应的SQL语句,实现CRUD操作了。CRUD操作是对数据库进行creat、read、update、delete操作的意思。
Writer’s block is not a myth, and constant writing will exhaust your inner resources very quickly. Guest posting could have been a good way out, but no one will write for an unknown blog with zero traffic. So, what’s the solution?
We continue our series of affiliate tool reviews with a quick guide on TemplateMonster theme showcases . These handcrafted article templates can be effortlessly customized to provide your blog with unique, easily scannable content.
What is it About Our Ready-Made Showcases?
Publishing unique content works towards the increase of organic traffic attracts backlinks and makes it much easier to grow audience. That’s why we regularly build fresh ready-to-use showcases for our affiliates.
Instead of writing template roundups from scratch, just download one of our showcases, enrich it with unique introductions and template descriptions, and publish it on your blog.
安装使用RESTful 框架SLIM方法的更多相关文章
- Windows下安装配置Yaf框架的方法及创建典型合理的Demo目录结构
Yaf是一个C语言编写的PHP框架,由鸟哥Laruence开发的高性能框架: Yaf官方文档:http://www.laruence.com/manual/index.html 第一步:安装PHP扩展 ...
- composer的安装以及laravel框架的安装(一)
laravel号称世界上最好的php框架,没有之一,下面介绍它的安装 laravel学习交流qq群:293798134 composer的安装 : php开发者很多,并且在web开发领域占据绝对统治地 ...
- RESTful框架调研
背景 当前的开放服务平台发展趋势,是服务使用者变得多种多样,其中既有各种前端设备(台式机.手机等),又有各种后端服务器,因此必须有一个统一的机制,方便各种服务使用者和开放服务平台进行通信.为了更好的实 ...
- (转)windows下安装nodejs及框架express
转自:http://jingyan.baidu.com/article/456c463b60fb380a583144a9.html windows下安装nodejs及框架express nodejs从 ...
- python Flask restful框架
框架地址:https://github.com/flask-restful/flask-restful 文档:http://flask-restful.readthedocs.io/en/0.3.5/ ...
- MIUI目前为止最简单安装谷歌服务框架教程
安装谷歌服务框架方法有很多,比如用第三方 rec卡刷gapps包.用第三方工具安装......然而这些对于新手来说还是比较难的! 我今天说的方法可以说是最简单的:1.不需要修改文件:2.不需要借助第三 ...
- 安卓4.0以上系统怎么不用root激活XPOSED框架的方法
在大多单位的引流或业务操作中,基本上都需要使用安卓的高端技术Xposed框架,近期,我们单位购买了一批新的安卓4.0以上系统,基本上都都是基于7.0以上版本,基本上都不能够刷入root超级权限,即便是 ...
- 最好的8个 Java RESTful 框架
原文出处: colobu 过去的每一年,涌现出越来越多的Java框架.就像JavaScript,每个人都认为他们知道一个好的框架的功能应该是怎么样的.连我的老祖母现在也使用 一个我从来没有听说过而且可 ...
- Python开发【笔记】:什么是RESTful框架
RESTful框架 前言: 一句话总结:用URL定位资源,用HTTP描述操作 越来越多的人开始意识到,网站即软件,而且是一种新型的软件. 这种"互联网软件"采用客户端/服务器模式 ...
随机推荐
- Spring Boot 2 Swagger2
本文将介绍RESTful API的重磅好伙伴Swagger2,它可以轻松的整合到Spring Boot中,并与Spring MVC程序配合组织出强大RESTful API文档. 它既可以减少我们创建文 ...
- The L1 Median (Weber 1909)
The L1 Median (Weber 1909) 链接网址 Derived from a transportation cost minimization problem, the L1 medi ...
- [MVCSharp]开始使用MVC#
Getting started with MVC# framework The source code of this example can be found under "Example ...
- javaScript函数与闭包
js中函数也是对象,具有一切对象的特征,可以作为表达式给变量赋值,可以作为函数的形参,或者函数的返回值,函数内可以嵌套函数等等,函数内以声明方式定义的函数是局部函数,用表达式声明的函数则由赋值变量的性 ...
- 编写简单的Mapreduce程序并部署在Hadoop2.2.0上运行
今天主要来说说怎么在Hadoop2.2.0分布式上面运行写好的 Mapreduce 程序. 可以在eclipse写好程序,export或用fatjar打包成jar文件. 先给出这个程序所依赖的Mave ...
- java ajax传值 中文乱码
String remark = new String(this.getRequest().getParameter("remark").getBytes("iso885 ...
- SpringMvc:视图和视图解析器
请求处理方法执行完成后,最终返回一个ModelAndView对象,对于返回String,View或ModelMap等类型的处理方法,SpringMvc也会在内部将它们装配成一个ModelAndView ...
- Java线程总结
在java中要想实现多线程,有两种手段,一种是继续Thread类,另外一种是实现Runable接口. 对于直接继承Thread的类来说,代码大致框架是: class 类名 extends Thread ...
- uboot.lds (一)
lds文件与scatter文件相似都是决定一个可执行程序的各个段的存储位置,以及入口地址,这也是链接定位的作用.U-boot的lds文件说明如下: SECTIONS{ ... ...
- demo14
/Users/alamps/AndroidStudioProjects/Demo12SimpleAdapter/Demo12SimpleAdapter/src/main/res/layout/tabl ...