Download the PHP package myphps/my-php-srv without Composer

On this page you can find all versions of the php package myphps/my-php-srv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package my-php-srv

使用

示例1 通过 composer的autolad

示例2 或直接通过自带Load.php载入

conf.php是myphp的配置文件

Workerman Event
onWorkerStart|onWorkerReload(Workerman\Worker $worker)
udp是无连接的,所以当使用udp时不会触发onConnect回调,也不会触发onClose回调
onConnect|onClose|onBufferFull|onBufferDrain(Workerman\Connection\TcpConnection TcpConnection $connection)
当客户端通过连接发来数据时(Workerman收到数据时)触发的回调函数
onMessage(Workerman\Connection\TcpConnection TcpConnection $connection, string|Workerman\Protocols\Http\Request $data)
当客户端的连接上发生错误时触发
onError(Workerman\Connection\TcpConnection $connection, $code, $msg)

$fd = $connection->id;

Swoole Event
在 Worker 进程 / Task 进程 启动时发生,这里创建的对象可以在进程生命周期内使用。多个监听时只有主服务器的事件有效 onWorkerStart|onWorkerStop(Swoole\Server $server, int $workerId)
当 Worker/Task 进程发生异常后会在 Manager 进程内回调此函数,主要用于报警和监控
onWorkerError(Swoole\Server $server, int $worker_id, int $worker_pid, int $exit_code, int $signal)
有新的连接进入时,在worker进程中回调 $fd 是连接的文件描述符
客户端连接关闭事件 TCP客户端连接关闭后,在worker进程中回调此函数 $reactorId当服务器主动关闭连接时,底层会设置此参数为-1
onConnect|onClose(Swoole\Server $server, int $fd, int $reactorId) 接收到数据时回调此函数,发生在worker进程中
tcp onReceive(Swoole\Server $server, int $fd, int $reactorId, string $data)
接收到UDP数据包时回调此函数,发生在worker进程中
udp onPacket(Swoole\Server $server, string $data, array $clientInfo)
websocket收到来自客户端的数据帧时会回调此函数
ws onMessage(Swoole\WebSocket\Server $server, Swoole\WebSocket\Frame $frame)
HTTP请求回调
http onRequest(Swoole\Http\Request $request, Swoole\Http\Response $response)
异步任务 在task_worker进程内被调用
onTask(Swoole\Server $server, int $task_id, int $src_worker_id, mixed $data)
task 进程的 onTask 事件中没有调用 finish 方法或者 return 结果,worker 进程不会触发 onFinish
onFinish(Swoole\Server $server, int $task_id, mixed $data)


All versions of my-php-srv with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
myphps/myphp Version ^2.18
workerman/workerman Version ^5.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package myphps/my-php-srv contains the following files

Loading the files please wait ....