« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 65 for Shell (0.006 sec.)
ssh2_shell_resize — Change the dimensions of a channel's pseudo-terminal | PHP ... 15545
ssh2_shell_resize (PECL ssh2 >= 1.4) ssh2_shell_resize — Change the dimensions of a channel's pseudo-terminal 説明 function ssh2_shell_resize ( resource $channel , int $width , int $height , int $width_px = 0 , int $height_px = 0 ): bool Re ... nd height_px can only be passed positionally. パラメータ channel An SSH channel stream, as returned by ssh2_exec() or ssh2_shell() . width The width of the terminal, in characters. height The height of the terminal, in characters. width_px The width o ... エラー / 例外 An E_WARNING is emitted when channel is not an SSH channel stream. 例 例1 Resizing the pseudo-terminal of a shell <?php $connection = ssh2_connect ( 'shell.example.com' , 22 ); ssh2_auth_password ( $connection , 'username' , 'password' ... ); $shell = ssh2_shell ( $connection , 'xterm' , null , 80 , 24 ); // Tell the remote end the terminal is now 132 columns by 43 rows ...
https://man.mtool.work/php/8.3/function.ssh2-shell-resize.html
定義済み定数 | PHP 8.3 10349
定義済み定数 以下の定数が定義されています。 この関数の拡張モジュールが PHP 組み込みでコンパイルされているか、 実行時に動的にロードされている場合のみ使用可能です。 SSH2_FINGERPRINT_MD5 ( int ) ホスト鍵のフィンガープリントを MD5 ハッシュとして ... の文字列として要求する ssh2_fingerprint() 用フラグ SSH2_TERM_UNIT_CHARS ( int ) 文字単位で 幅 と 高さ を指定するための ssh2_shell() 用フラグ SSH2_TERM_UNIT_PIXELS ( int ) ピクセル単位で 幅 と 高さ を指定するための ssh2_shell() 用フラグ SSH2_DEFAULT_TER ... M_WIDTH ( int ) ssh2_shell() で要求されるデフォルトのターミナル幅 SSH2_DEFAULT_TERM_HEIGHT ( int ) ssh2_shell() で要求されるデフォルトのターミナル高さ ... SSH2_DEFAULT_TERM_UNIT ( int ) ssh2_shell() で要求されるデフォルトのターミナル単位 SSH2_STREAM_STDIO ( int ) STDIO サブチャネルを要求する ssh2_fetch_stream() 用フラ ...
https://man.mtool.work/php/8.3/ssh2.constants.html
ssh2_shell — 対話式のシェルを要求する | PHP 8.3 9933
ssh2_shell (PECL ssh2 >= 0.9.0) ssh2_shell — 対話式のシェルを要求する 説明 function ssh2_shell ( resource $session , string $termtype = "vanilla" , ? array $env = null , int $width = 80 , int $height = 25 , int $width_height_type = SSH2_TER ... ームリソースを返します。 失敗した場合に false を返します. 例 例1 対話シェルのリクエスト <?php $connection = ssh2_connect ( 'shell.example.com' , 22 ); ssh2_auth_password ( $connection , 'username' , 'password' ); $stream = ssh2_shell ( $connection , 'v ...
https://man.mtool.work/php/8.3/function.ssh2-shell.html
持続的接続 | PHP 8.3 9933
持続的接続 持続的接続の使用 mysqli と mysqlnd の組み合わせで使っている場合は、 持続的接続を作るときにサーバー上で COM_CHANGE_USER ( mysql_change_user() ) を呼び出します。これで、接続の認証が再び行われることになります。 COM_CHANGE_USER の呼び ... ようにするには、コンパイルのときに MYSQLI_NO_CHANGE_USER_ON_PCONNECT フラグを使います。たとえば次のようになります。 例えば、 shell# CFLAGS="-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT" ./configure --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bi ... -mysql=/usr/local/mysql/bin/mysql_config --enable-debug && make clean && make -j6 またはその代わりに、以下のようにします。 shell# export CFLAGS="-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT" shell# configure --whatever-option shell# make clean shell# make mysq ...
https://man.mtool.work/php/8.3/mysqlnd.persist.html
shell_exec — シェルによりコマンドを実行し、文字列として出力全体を返す | PHP 8.3 9848
shell_exec (PHP 4, PHP 5, PHP 7, PHP 8) shell_exec — シェルによりコマンドを実行し、文字列として出力全体を返す 説明 function shell_exec ( string $command ): string | false | null この関数は、非推奨の バッククォート演算子 と等価です。 注意 : ... きには exec() を使いましょう。 エラー / 例外 パイプがオープンできなかった場合は E_WARNING レベルの警告が発生します。 例 例1 shell_exec() の例 <?php $output = shell_exec ( 'ls -lart' ); echo "<pre> $output </pre>" ; ?> 参考 exec() - 外部プログラムを実行 ... する escapeshellcmd() - シェルのメタ文字をエスケープする 他のマニュアルの関連ページ Linux JM popen(3) Linux JM pclose(3) Python asyncio-sub ...
https://man.mtool.work/php/8.3/function.shell-exec.html
Expect の使用例 | PHP 8.3 8588
Expect の使用例 例1 Expect の使用例 この例ではリモートホストに SSH 経由で接続し、接続先の稼働時間を表示します。 <?php ini_set ( "expect.loguser" , "Off" ); $stream = fopen ( "expect://ssh root@remotehost uptime" , "r" ); $cases = array ( ar ... ードを問い合わせます array ( "yes/no)?" , YESNO ), // SSH がホストエントリを保存するかどうかを問い合わせます array ( "~$ " , SHELL , EXP_EXACT ), // シェルにたどり着きました! ))) { case PASSWORD : fwrite ( $stream , "secret\n" ); break; case YESNO : fwr ... ite ( $stream , "yes\n" ); break; case SHELL : fwrite ( $stream , "uname -a\n" ); while ( true ) { switch ( expect_expectl ( $stream , array ( array ( "~$ " , SHELL , ... y ( "^Linux.*$" , UNAME , EXP_REGEXP ), // uname -a の出力 ), $match )) { case UNAME : $uname .= $match [ 0 ]; break; case SHELL : // アップデートの実行 if ( strstr ( $uname , "x86_64" )) { fwrite ( $stream , "rpm -Uhv http://mirrorsite/somepath/some_ ...
https://man.mtool.work/php/8.3/expect.examples-usage.html
ssh2_fetch_stream — 拡張データストリームを取得する | PHP 8.3 8516
ssh2_fetch_stream (PECL ssh2 >= 0.9.0) ssh2_fetch_stream — 拡張データストリームを取得する 説明 function ssh2_fetch_stream ( resource $channel , int $streamid ): resource SSH2 チャネルストリームと関連付けられたサブストリームを取得します。 SS ... を返します。 例 例1 シェルをオープンし、それと関連付けられた stderr ストリームを処理する <?php $connection = ssh2_connect ( 'shell.example.com' , 22 ); ssh2_auth_password ( $connection , 'username' , 'password' ); $stdio_stream = ssh2_shell ( $connectio ... n ); $stderr_stream = ssh2_fetch_stream ( $stdio_stream , SSH2_STREAM_STDERR ); ?> 参考 ssh2_shell() - 対話式のシェルを要求する ssh2_exec() - リモートサーバー上でコマンドを実行する ssh2_connect() - SSH サーバーに接続する ...
https://man.mtool.work/php/8.3/function.ssh2-fetch-stream.html
ssh2_send_signal — Send a signal to a remote process | PHP 8.3 8431
ssh2_send_signal (PECL ssh2 >= 1.5.0) ssh2_send_signal — Send a signal to a remote process 説明 function ssh2_send_signal ( resource $channel , string $signal ): bool Sends a signal to the process running at the remote end of the given chan ... extension is built against libssh2 >= 1.9.0. パラメータ channel An SSH channel stream, as returned by ssh2_exec() or ssh2_shell() . signal The name of the signal to send, without the SIG prefix, as defined by the SSH connection protocol ( » RFC 4254 ... el stream, and when the signal could not be sent. 例 例1 Interrupting a remote command <?php $connection = ssh2_connect ( 'shell.example.com' , 22 ); ssh2_auth_password ( $connection , 'username' , 'password' ); $stream = ssh2_exec ( $connection , 'tr ... $stream , true ); echo stream_get_contents ( $stream ); ?> 参考 ssh2_exec() - リモートサーバー上でコマンドを実行する ssh2_shell() - 対話式のシェルを要求する ssh2_send_eof() - ストリームに EOF を送信する 他のマニュアルの関連ページ Linux JM signal(2) L ...
https://man.mtool.work/php/8.3/function.ssh2-send-signal.html
実行演算子 | PHP 8.3 8431
実行演算子 PHP は 1 種類の実行演算子、バッククォート ( `` ) をサポートします。 シングルクォートではないことに注意してください! PHP は、バッククォートの 中身をシェルコマンドとして実行しようとします。出力が返されます (すなわち、出力を単にダン ... プするのではなく、変数に代入することが できます) 。 バッククォート演算子の使用は shell_exec() と等価です。 例1 バッククォート演算子 <?php $output = ` ls -al `; echo "<pre> $output </pre>" ; ?> 注意 : バッククォ ... ート演算子は、 shell_exec() が無効な場合は無効となります。 注意 : 他の言語とは異なり、 ダブルクォートで囲まれた文字列の中でのバッククォート演算 ... 子には何の効力もありません。 変更履歴 バージョン 説明 8.5.0 shell_exec() のエイリアスとして使われているバッククォート演算子は、 推奨されなくなりました。 参考 システムプログラムの実行 popen ...
https://man.mtool.work/php/8.3/language.operators.execution.html
ssh2:// — Secure Shell 2 | PHP 8.3 8173
ssh2:// ssh2:// — Secure Shell 2 説明 ssh2.shell:// ssh2.exec:// ssh2.tunnel:// ssh2.sftp:// ssh2.scp:// (PECL) 注意 : このラッパーはデフォルトでは有効になっていません ssh2.*:// ラッパーを使用するには、 » PECL から » SSH2 拡張モジュールを ... ラッパーでは、URL のホスト部分に接続リソースを渡すことで既にオープン している接続を再利用することが可能です。 利用法 ssh2.shell://user:pass@example.com:22/xterm ssh2.exec://user:pass@example.com:22/usr/local/bin/somecmd ssh2.tunnel://user:pass@exampl ... e.com:22/192.168.0.1:14 ssh2.sftp://user:pass@example.com:22/path/to/filename オプション ラッパーの概要 属性 ssh2.shell ssh2.exec ssh2.tunnel ssh2.sftp ssh2.scp allow_url_fopen で制約される Yes Yes Yes Yes Yes 読み込み許可 Yes Yes Yes Yes Yes ...
https://man.mtool.work/php/8.3/wrappers.ssh2.html
PREV 1 2 3 4 5 6 7 NEXT