相关框架:

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方法的更多相关文章

  1. Windows下安装配置Yaf框架的方法及创建典型合理的Demo目录结构

    Yaf是一个C语言编写的PHP框架,由鸟哥Laruence开发的高性能框架: Yaf官方文档:http://www.laruence.com/manual/index.html 第一步:安装PHP扩展 ...

  2. composer的安装以及laravel框架的安装(一)

    laravel号称世界上最好的php框架,没有之一,下面介绍它的安装 laravel学习交流qq群:293798134 composer的安装 : php开发者很多,并且在web开发领域占据绝对统治地 ...

  3. RESTful框架调研

    背景 当前的开放服务平台发展趋势,是服务使用者变得多种多样,其中既有各种前端设备(台式机.手机等),又有各种后端服务器,因此必须有一个统一的机制,方便各种服务使用者和开放服务平台进行通信.为了更好的实 ...

  4. (转)windows下安装nodejs及框架express

    转自:http://jingyan.baidu.com/article/456c463b60fb380a583144a9.html windows下安装nodejs及框架express nodejs从 ...

  5. python Flask restful框架

    框架地址:https://github.com/flask-restful/flask-restful 文档:http://flask-restful.readthedocs.io/en/0.3.5/ ...

  6. MIUI目前为止最简单安装谷歌服务框架教程

    安装谷歌服务框架方法有很多,比如用第三方 rec卡刷gapps包.用第三方工具安装......然而这些对于新手来说还是比较难的! 我今天说的方法可以说是最简单的:1.不需要修改文件:2.不需要借助第三 ...

  7. 安卓4.0以上系统怎么不用root激活XPOSED框架的方法

    在大多单位的引流或业务操作中,基本上都需要使用安卓的高端技术Xposed框架,近期,我们单位购买了一批新的安卓4.0以上系统,基本上都都是基于7.0以上版本,基本上都不能够刷入root超级权限,即便是 ...

  8. 最好的8个 Java RESTful 框架

    原文出处: colobu 过去的每一年,涌现出越来越多的Java框架.就像JavaScript,每个人都认为他们知道一个好的框架的功能应该是怎么样的.连我的老祖母现在也使用 一个我从来没有听说过而且可 ...

  9. Python开发【笔记】:什么是RESTful框架

    RESTful框架 前言:  一句话总结:用URL定位资源,用HTTP描述操作 越来越多的人开始意识到,网站即软件,而且是一种新型的软件. 这种"互联网软件"采用客户端/服务器模式 ...

随机推荐

  1. TXT导入出现乱码

    错误#1 11:15 2012-12-19客户提供一txt文本文件,要求导入到数据库,选用dts导入工具,选择数据源步骤如下列预览时出现乱码解答#1 双击打开原始文件中文显示正常,将其另存为选择编码为 ...

  2. urllib下载文件

    import urllib 1.用urlib.urlretrieve f = urllib.urlretrieve('http://www.baidu.com/img/bdlogo.gif','/tm ...

  3. Java基础之线程——派生自Thread类的子类(TryThread)

    控制台程序. 程序总是至少有一个线程,程序开始执行时就会创建这个线程.在普通的Java应用程序中,这个线程从mian()方法的开头启动. 要开始执行线程,可以调用Thread对象的start()方法. ...

  4. 《数据结构与算法分析:C语言描述_原书第二版》CH2算法分析_课后习题_部分解答

    对于一个初学者来说,作者的Solutions Manual把太多的细节留给了读者,这里尽自己的努力给出部分习题的详解: 不当之处,欢迎指正. 1.  按增长率排列下列函数:N,√2,N1.5,N2,N ...

  5. PG sys function

    The System Catalogs of PostgreSQLscott=# \dS List of relations Schema | Name | Type | Owner -------- ...

  6. Leetcode: Count Numbers with Unique Digits

    Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Examp ...

  7. 转:Apache POI Tutorial

    Welcome to Apache POI Tutorial. Sometimes we need to read data from Microsoft Excel Files or we need ...

  8. cpp quiz

    // ConsoleApplication1.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <iostream&g ...

  9. zoj The 12th Zhejiang Provincial Collegiate Programming Contest Convert QWERTY to Dvorak

    http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5502  The 12th Zhejiang Provincial ...

  10. [转]MySQL数据库引擎

    经常用MySQL数据库,但是,你在用的时候注意过没有,数据库的存储引擎,可能有注意但是并不清楚什么意思,可能根本没注意过这个问题,使用了默认的数据库引擎,当然我之前属于后者,后来成了前者,然后就有了这 ...