轻量级常驻内存型 PHP API 开发框架 LinkPHP

码农软件 · 软件分类 · Web框架 · 2019-03-24 14:29:26

软件介绍

 _        _              _                  
| |      | |   _   ___  | |      ___
| |  ___ | | / / /  _  \| |_   /  _  \
| | | \ \| |/ /  | |_| ||  _ \ | |_| |
| |_| |\ V |\ \  | .___/| | | || .___/
|_____| \ _' \_\ | |    | | | || |

基于swoole实现的一款高性能多进程常驻内存型全栈框架,内置服务治理PhpRpc功能,不依赖传统的 PHP-FPM,可以用于构建高性能的Web系统、API、中间件、基础服务等等。

部署条件

1、PHP版本不能小于5.5版本建议7.0版本(框架作者可能会发疯强制升级到php7)

2、已经安装swoole扩展

支持的服务器和数据库环境

支持Windows/Unix服务器环境 可运行于包括Apache、IIS和nginx在内的多种WEB服务器和模式 框架默认只支持Mysql数据库后期可扩展,需安装相关Pdo扩展

支持composer

请确保服务器环境支持composer

在linkphp项目根目录执行 composer install命令,安装框架执行所需的所有依赖库

http服务器启动(常驻内存模式)

进入

bin\

目录,使用命令

php httpd start //启动
php httpd stop  //停止

 _        _              _                  
| |      | |   _   ___  | |      ___
| |  ___ | | / / /  _  \| |_   /  _  \
| | | \ \| |/ /  | |_| ||  _ \ | |_| |
| |_| |\ V |\ \  | .___/| | | || .___/
|_____| \ _' \_\ | |    | | | || |

[2018-06-01 15:43:12] Server    Name: link-httpd
[2018-06-01 15:43:12] PHP    Version: 7.1.7
[2018-06-01 15:43:12] Swoole Version: 2.1.3
[2018-06-01 15:43:12] Listen    Address: 127.0.0.1
[2018-06-01 15:43:12] Listen    Port: 9508

第一种方式:使用linkphp提倡的以常驻内存形式启动方式,前端可以配合nginx负载均衡使用

第二种方式:传统的LNMP/LAMP方式启动,则将根目录定义到src/web目录下
将会由非内存形式启动,请求一次则会进行释放,无法使用常驻内存形式提高性能

Nginx + httpd使用

server {
    root /wwwroot/;
    server_name www.linkphp.cn;

    location / {
        proxy_http_version 1.1;
        proxy_set_header Connection "keep-alive";
        proxy_set_header X-Real-IP $remote_addr;
        if (!-e $request_filename) {
             proxy_pass http://127.0.0.1:9508;
        }
    }
}

本文地址:https://codercto.com/soft/d/2053.html

Algorithms + Data Structures = Programs

Algorithms + Data Structures = Programs

Niklaus Wirth / Prentice Hall / 1975-11-11 / GBP 84.95

It might seem completely dated with all its examples written in the now outmoded Pascal programming language (well, unless you are one of those Delphi zealot trying to resist to the Java/.NET dominanc......一起来看看 《Algorithms + Data Structures = Programs》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

html转js在线工具
html转js在线工具

html转js在线工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具