【文件属性】:
文件名称:PHP版的Node.jsReact.zip
文件大小:10KB
文件格式:JSREACT
更新时间:2022-08-08 08:42:41
开源项目
React (Node.PHP) 是一个 PHP 开发的平台,用于构建快速、可伸缩的网络应用,可用于事件驱动的、无堵塞的 I/O 模型,特点是轻量级而且高效率,特别适合用于数据敏感的实时应用交互。
示例代码:
require 'vendor/autoload.php';
$stack = new React\Espresso\Stack(function ($request, $response) {
$response->writeHead(200, array('Content-Type' => 'text/plain'));
$response->end("Hello World\n");
});
echo "Server running at http://127.0.0.1:1337\n";
$stack->listen(1337);
运行方法:
% php example.php
Server running at http://127.0.0.1:1337
标签:React
【文件预览】:
react-master
----composer.json(756B)
----.travis.yml(408B)
----tests()
--------bootstrap.php(1KB)
----LICENSE(1KB)
----.gitignore(32B)
----CHANGELOG.md(7KB)
----phpunit.xml.dist(955B)
----README.md(10KB)