承接 appserver-io/fastcgi 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

appserver-io/fastcgi

最新稳定版本:v2.0.0

Composer 安装命令:

composer require appserver-io/fastcgi

包简介

fastcgi client

README 文档

README

Fork of [https://github.com/CrunchPHP/fastcgi]

FastCGI client library

Allows to access a FastCGI-server directly from PHP.

  • Subrequest
  • Testing (fetch pages as seen by the webserver)
  • Background tasks

Usage

Preparation

require __DIR__ . '/../vendor/autoload.php';
use Crunch\FastCGI\Client as FastCGI;

$fastCgi = new FastCGI('unix:///var/run/php5-fpm.socket', null);
// $fastCgi = new FastCGI('localhost', 9999);
$connection = $fastCgi->connect();

The request

$request = $connection->newRequest();
$request->parameters = array(
    'GATEWAY_INTERFACE' => 'FastCGI/1.0',
    'REQUEST_METHOD' => 'POST',
    'SCRIPT_FILENAME' => '/var/www/example.php',
    'CONTENT_TYPE' => 'application/x-www-form-urlencoded',
    'CONTENT_LENGTH' => strlen('foo=bar')
);
$request->stdin = 'foo=bar';

Single request and response

$response = $connection->request($request);
echo $response->content;

Background (includes multiplexing)

$connection->sendRequest($request);
// Many code
$response = $connection->receiveResponse($request);

Requirements

  • PHP => 5.3

Contributors

See CONTRIBUTING.md for details on how to contribute.

License

This library is licensed under the MIT License. See the LICENSE file for details.

统计信息

  • 总下载量: 6.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固