PHP ftp_raw()関数
例
FTPサーバーに接続し、コマンドを実行します。
<?php
// connect to FTP server
$ftp_server = "ftp.example.com";
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
// the two lines below is the same as: ftp_login($ftp_conn,"john","secretpassword");
ftp_raw($ftp_conn, "USER john");
ftp_raw($ftp_conn, "PASS secretpassword");
?>
定義と使用法
ftp_raw()関数はrawコマンドをFTPサーバーに送信します。
構文
<div>ftp_raw(<em>ftp_conn, command</em>);</div>
パラメータ値
|
パラメータ |
説明 |
|---|---|
| ftp_conn | Required 使用するFTP接続を指定します |
| command | Required 実行するコマンドを指定します |
技術的な詳細
|
戻り値: |
文字列の配列としてのサーバーからの応答 |
|---|---|
|
PHP バージョン: |
5+ |