安装使用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描述操作 越来越多的人开始意识到,网站即软件,而且是一种新型的软件. 这种"互联网软件"采用客户端/服务器模式 ...
随机推荐
- Alloc and release
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractic ...
- Angular.js+Bootstrap实现表格分页
最近一直学习Angular.js,在学习过程中也练习了很多的Demo,这里先贴一下表格+分页. 先上图看看最终结果: 不得不说Angular.js代码风格很受人欢迎,几十行代码清晰简洁的实现了上面的功 ...
- Swift游戏实战-跑酷熊猫 04 熊猫的跳和滚的动作
这节内容,我们利用上一节学过的内容,给熊猫添加跳和滚动的动作.同时通过重载touchBegan方法来响应动作.切换跑,跳,滚. 要点: 通过序列帧纹理产生动画: SKAction.animatWith ...
- 资源Createwindow,对应标识符,绑定窗口
问? 定义一个CEdit cedit1:怎么和IDC_EDIT1 关联,可以在CEdit.Create()里传进去或者在DoDataExchange()里面绑定,是不是一定要先弄出个IDC_EDIT1 ...
- 转:python webdriver API 之下拉框处理
下拉框也是 web 页面上非常常见的功能,webdriver 对于一般的下拉框处理起来也相当简单,要想定位下拉框中的内容,首先需要定位到下拉框:这样的二次定位,我们在前面的例子中已经有过使用,下面通过 ...
- 序列变换(hdu5248)
序列变换 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
- new XMLHttpRequest()和页面关系
1. 三个页面分别对应"自己“的异步对象(3个) <title></title> <script type="text/javascript&quo ...
- sdutoj 2152 Balloons
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2152 Balloons Time Limit: ...
- C#删除xml中某个节点的子节点方法
if (File.Exists(xmlFilePath)) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(xmlFilePath); Xm ...
- Ubuntu Firefox installs Flashplayer
Adobe flash 下载(https://get.adobe.com/flashplayer/) tar.gz版本(注:adobe 提供了yum,rpm,tar.gz和APT四种版本,yum和t ...