« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 13 for sendReply (0.002 sec.)
EventHttpRequest::sendReply — Send an HTML reply to the client | PHP 8.3 13689
EventHttpRequest::sendReply (PECL event >= 1.4.0-beta) EventHttpRequest::sendReply — Send an HTML reply to the client 説明 public function EventHttpRequest::sendReply ( int $code , string $reason , EventBuffer $buf = ? ): void Send an HTML ... e. 戻り値 値を返しません。 参考 EventHttpRequest::sendError() - Send an HTML error message to the client EventHttpRequest::sendReplyChunk() - Send another data chunk as part of an ongoing chunked reply 他のマニュアルの関連ページ FastAPI OpenAPI Callbacks ...
https://man.mtool.work/php/8.3/eventhttprequest.sendreply.html
EventHttp::setCallback — Sets a callback for specified URI | PHP 8.3 10170
EventHttp::setCallback (PECL event >= 1.4.0-beta) EventHttp::setCallback — Sets a callback for specified URI 説明 public function EventHttp::setCallback ( string $path , string $cb , string $arg = ? ): void Sets a callback for specified URI ... putHeaders ()); echo "Output headers:" ; var_dump ( $req -> getOutputHeaders ()); echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; echo "\n >> Reading input buffer ...\n" ; $buf = $req -> getInputBuffer (); while ( $s = $bu ... $req ) { echo __METHOD__ , PHP_EOL ; echo "URI: " , $req -> getUri (), PHP_EOL ; echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; } function _http_default ( $req , $data ) { echo __METHOD__ , PHP_EOL ; echo "URI: " , $req ... -> getUri (), PHP_EOL ; echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; } $port = 8010 ; if ( $argc > 1 ) { $port = (int) $argv [ 1 ]; } if ( $port <= 0 || $port > ...
https://man.mtool.work/php/8.3/eventhttp.setcallback.html
EventHttp::__construct — Constructs EventHttp object (the HTTP server) | PHP 8.... 9818
EventHttp::__construct (PECL event >= 1.2.6-beta) EventHttp::__construct — Constructs EventHttp object (the HTTP server) 説明 public function EventHttp::__construct ( EventBase $base , EventSslContext $ctx = null ) Constructs the HTTP serve ... putHeaders ()); echo "Output headers:" ; var_dump ( $req -> getOutputHeaders ()); echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; echo "\n >> Reading input buffer ...\n" ; $buf = $req -> getInputBuffer (); while ( $s = $bu ... $req ) { echo __METHOD__ , PHP_EOL ; echo "URI: " , $req -> getUri (), PHP_EOL ; echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; } function _http_default ( $req , $data ) { echo __METHOD__ , PHP_EOL ; echo "URI: " , $req ... -> getUri (), PHP_EOL ; echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; } $port = 8010 ; if ( $argc > 1 ) { $port = (int) $argv [ 1 ]; } if ( $port <= 0 || $port > ...
https://man.mtool.work/php/8.3/eventhttp.construct.html
The EventHttpRequest class | PHP 8.3 9114
The EventHttpRequest class (PECL event >= 1.4.0-beta) はじめに Represents an HTTP request. クラス概要 class EventHttpRequest { /* 定数 */ const int CMD_GET = 1 ; const int CMD_POST = 2 ; const int CMD_HEAD = 4 ; const int CMD_PUT = 8 ; cons ... string $key , string $type ): void public function sendError ( int $error , string $reason = null ): void public function sendReply ( int $code , string $reason , EventBuffer $buf = ? ): void public function sendReplyChunk ( EventBuffer $buf ): void publ ... ic function sendReplyEnd (): void public function sendReplyStart ( int $code , string $reason ): void } 定義済み定数 EventHttpRequest::CMD_GET G ... r from the headers of the request EventHttpRequest::sendError — Send an HTML error message to the client EventHttpRequest::sendReply — Send an HTML reply to the client EventHttpRequest::sendReplyChunk — Send another data chunk as part of an ongoing chunke ...
https://man.mtool.work/php/8.3/class.eventhttprequest.html
EventHttp::accept — Makes an HTTP server accept connections on the specified so... 9114
EventHttp::accept (PECL event >= 1.2.6-beta) EventHttp::accept — Makes an HTTP server accept connections on the specified socket stream or resource 説明 public function EventHttp::accept ( mixed $socket ): bool Makes an HTTP server accept c ... p -> setCallback ( "/some-page" , function () { echo "(some-page)\n" ; echo "URI: " , $req -> getUri (), PHP_EOL ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; }); $http -> setDefaultCallback (function ( $req ) { echo "URI: " , $req -> getUri (), PHP_E ... OL ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; }); $signal = Event :: signal ( $base , SIGINT , function () use ( $base ) { echo "Caught SI ...
https://man.mtool.work/php/8.3/eventhttp.accept.html
例 | PHP 8.3 8938
例 例1 Simple HTTP client <?php // Read callback function readcb ( $bev , $base ) { //$input = $bev->input; //$bev->getInput(); //$pos = $input->search("TTP"); $pos = $bev -> input -> search ( "TTP" ); while (( $n = $bev -> input -> remove ... putHeaders ()); echo "Output headers:" ; var_dump ( $req -> getOutputHeaders ()); echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; echo "\n >> Reading input buffer ...\n" ; $buf = $req -> getInputBuffer (); while ( $s = $bu ... $req ) { echo __METHOD__ , PHP_EOL ; echo "URI: " , $req -> getUri (), PHP_EOL ; echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; } function _http_default ( $req , $data ) { echo __METHOD__ , PHP_EOL ; echo "URI: " , $req ... -> getUri (), PHP_EOL ; echo "\n >> Sending reply ..." ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; } $port = 8010 ; if ( $argc > 1 ) { $port = (int) $argv [ 1 ]; } if ( $port <= 0 || $port > ...
https://man.mtool.work/php/8.3/event.examples.html
EventHttpRequest::sendError — Send an HTML error message to the client | PHP 8.... 8410
EventHttpRequest::sendError (PECL event >= 1.4.0-beta) EventHttpRequest::sendError — Send an HTML error message to the client 説明 public function EventHttpRequest::sendError ( int $error , string $reason = null ): void Send an HTML error m ... > setCallback ( "/err400" , "_http_400" ); $http -> bind ( "0.0.0.0" , 8010 ); $base -> loop (); ?> 参考 EventHttpRequest::sendReply() - Send an HTML reply to the client 他のマニュアルの関連ページ Python http Linux JM error(3) DuckDB Result Verification D ...
https://man.mtool.work/php/8.3/eventhttprequest.senderror.html
EventHttp::addServerAlias — Adds a server alias to the HTTP server object | PHP... 8234
EventHttp::addServerAlias (PECL event >= 1.4.0-beta) EventHttp::addServerAlias — Adds a server alias to the HTTP server object 説明 public function EventHttp::addServerAlias ( string $alias ): bool Adds a server alias to the HTTP server obj ... ver alias\n" ); } $http -> setCallback ( "/about" , function( $req ) { echo "URI: " , $req -> getUri (), PHP_EOL ; $req -> sendReply ( 200 , "OK" ); }); $base -> dispatch (); ?> 参考 EventHttp::removeServerAlias() - Removes server alias 他のマニュアルの関 ...
https://man.mtool.work/php/8.3/eventhttp.addserveralias.html
EventHttp::setDefaultCallback — Sets default callback to handle requests that a... 8234
EventHttp::setDefaultCallback (PECL event >= 1.4.0-beta) EventHttp::setDefaultCallback — Sets default callback to handle requests that are not caught by specific callbacks 説明 public function EventHttp::setDefaultCallback ( string $cb , st ... ind(1) failed\n" ); }; $http -> setDefaultCallback (function( $req ) { echo "URI: " , $req -> getUri (), PHP_EOL ; $req -> sendReply ( 200 , "OK" ); }); $base -> dispatch (); ?> 参考 EventHttp::setCallback() - Sets a callback for specified URI 他のマニュア ...
https://man.mtool.work/php/8.3/eventhttp.setdefaultcallback.html
EventHttp::bind — Binds an HTTP server on the specified address and port | PHP ... 7706
EventHttp::bind (PECL event >= 1.2.6-beta) EventHttp::bind — Binds an HTTP server on the specified address and port 説明 public function EventHttp::bind ( string $address , int $port ): void Binds an HTTP server on the specified address and ... ) failed\n" ); }; $http -> setCallback ( "/about" , function( $req ) { echo "URI: " , $req -> getUri (), PHP_EOL ; $req -> sendReply ( 200 , "OK" ); echo "OK\n" ; }); $base -> dispatch (); ?> 上の例の出力は、 たとえば以下のようになります。 Client: $ nc 12 ...
https://man.mtool.work/php/8.3/eventhttp.bind.html
PREV 1 2 NEXT