相关框架:
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.