相關框架:php
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安裝還蠻困難的,沒找到教程。通過一翻折騰後,我找到簡便的安裝方式了。laravel
先去 https://getcomposer.org 下載 composer.phargit
composer.phar 是一個PHP的壓縮包,可直接運行,不須要想辦法解開。github
用web
php composer.phar require slim/slim "^3.0"代替 https://github.com/slimphp/Slim 的說明書中提到的:數據庫
$ composer require slim/slim "^3.0"這樣相關的依賴包都安裝上了:json
$ php composer.phar require slim/slim "^3.0"api
./composer.json has been createdyii2
Loading composer repositories with package informationapp
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.