• 安装使用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.

  • 相关阅读:
    Qt中使用C#的dll
    一、深拷贝和浅拷贝
    1、手撕Promise上
    JavaScript之四大继承方法
    C++ 模板编程简单示例程序
    C++深拷贝浅拷贝示例程序
    C++虚基类 类接口应用示例程序
    C++使用定义静态类,禁止实例化&&继承程序示例(借助纯虚函数是的只能以类名访问属性和方法)
    202204092012_《Clion激活小记》 Coca
    202204091505_《GNU ARM Toolchain安装成功》 Coca
  • 原文地址:https://www.cnblogs.com/2881064178dinfeng/p/6198578.html
Copyright © 2020-2023  润新知