PHPチュートリアル

PHPホーム PHPイントロ PHPインストール PHP構文 PHPコメント PHP変数 PHPエコー/印刷 PHPデータ型 PHP文字列 PHP番号 PHP数学 PHP定数 PHP演算子 PHP If ... Else ... Elseif PHPスイッチ PHPループ PHP関数 PHP配列 PHPスーパーグローバル PHP正規表現

PHPフォーム

PHPフォーム処理 PHPフォームの検証 PHPフォームが必要 PHPフォームのURL / Eメール PHPフォームの完了

PHP Advanced

PHPの日付と時刻 PHPインクルード PHPファイルの処理 PHPファイルのオープン/読み取り PHPファイルの作成/書き込み PHPファイルのアップロード PHPクッキー PHPセッション PHPフィルター PHPフィルターアドバンスト PHPコールバック関数 PHP JSON PHPの例外

PHPOOP _

PHPOOPとは PHPクラス/オブジェクト PHPコンストラクター PHPデストラクタ PHPアクセス修飾子 PHPの継承 PHP定数 PHP抽象クラス PHPインターフェース PHPの特性 PHP静的メソッド PHPの静的プロパティ PHP名前空間 PHPIterables

MySQLデータベース

MySQLデータベース MySQLコネクト MySQL Create DB MySQLテーブルの作成 MySQLの挿入データ MySQLは最後のIDを取得します MySQL Insert Multiple MySQLを準備しました MySQL Select Data MySQL Where MySQL Order By MySQLデータの削除 MySQLアップデートデータ MySQL制限データ

PHP XML

PHPXMLパーサー PHPSimpleXMLパーサー PHPSimpleXML-取得 PHP XMLExpat PHP XML DOM

PHP -AJAX

AJAXイントロ AJAX PHP AJAXデータベース AJAX XML AJAXライブ検索 AJAXポール

PHPの

PHPの例 PHPコンパイラ PHPクイズ PHP演習 PHP証明書

PHPリファレンス

PHPの概要 PHP配列 PHPカレンダー PHPの日付 PHPディレクトリ PHPエラー PHP例外 PHPファイルシステム PHPフィルター PHP FTP PHP JSON PHPキーワード PHP Libxml PHPメール PHP数学 PHPその他 PHP MySQLi PHPネットワーク PHP出力制御 PHP正規表現 PHP SimpleXML PHPストリーム PHP文字列 PHP変数の処理 PHPXMLパーサー PHP Zip PHPタイムゾーン

PHPFTP関数_


PHPFTPの紹介

FTP機能は、ファイル転送プロトコル(FTP)を介してクライアントにファイルサーバーへのアクセスを提供します。

FTP機能は、接続を開いたり、ログインしたり、閉じたりするだけでなく、ファイルサーバーからファイルに関する情報をアップロード、ダウンロード、名前変更、削除、および取得するために使用されます。すべてのFTP関数がすべてのサーバーで機能したり、同じ結果を返したりするわけではありません。FTP機能はPHP3で利用できるようになりました。

FTPサーバー上のファイルの読み取りまたは書き込みのみを行う場合は、よりシンプルで直感的なインターフェイスを提供するファイルシステム関数でftp://ラッパーを使用することを検討してください。


インストール

これらの関数を機能させるには、-enable-ftpを使用してPHPをコンパイルする必要があります。

WindowsバージョンのPHPには、この拡張機能のサポートが組み込まれています。


PHPFTP関数

Function Description
ftp_alloc() Allocates space for a file to be uploaded to the FTP server
ftp_cdup() Changes to the parent directory on the FTP server
ftp_chdir() Changes the current directory on the FTP server
ftp_chmod() Sets permissions on a file via FTP
ftp_close() Closes an FTP connection
ftp_connect() Opens an FTP connection
ftp_delete() Deletes a file on the FTP server
ftp_exec() Executes a command on the FTP server
ftp_fget() Downloads a file from the FTP server and saves it into an open local file
ftp_fput() Uploads from an open file and saves it to a file on the FTP server
ftp_get() Downloads a file from the FTP server
ftp_get_option() Returns runtime options of the FTP connection
ftp_login() Logs in to the FTP connection
ftp_mdtm() Returns the last modified time of a specified file
ftp_mkdir() Creates a new directory on the FTP server
ftp_mlsd() Returns the list of files in the specified directory
ftp_nb_continue() Continues retrieving/sending a file (non-blocking)
ftp_nb_fget() Downloads a file from the FTP server and saves it into an open file (non-blocking)
ftp_nb_fput() Uploads from an open file and saves it to a file on the FTP server (non-blocking)
ftp_nb_get() Downloads a file from the FTP server (non-blocking)
ftp_nb_put() Uploads a file to the FTP server (non-blocking)
ftp_nlist() Returns a list of files in the specified directory on the FTP server
ftp_pasv() Turns passive mode on or off
ftp_put() Uploads a file to the FTP server
ftp_pwd() Returns the current directory name
ftp_quit() Alias of ftp_close()
ftp_raw() Sends a raw command to the FTP server
ftp_rawlist() Returns a list of files with file information from a specified directory
ftp_rename() Renames a file or directory on the FTP server
ftp_rmdir() Deletes an empty directory on the FTP server
ftp_set_option() Sets runtime options for the FTP connection
ftp_site() Sends an FTP SITE command to the FTP server
ftp_size() Returns the size of the specified file
ftp_ssl_connect() Opens a secure SSL-FTP connection
ftp_systype() Returns the system type identifier of the FTP server

PHPの事前定義されたFTP定数

Constant Type Description
FTP_ASCII Integer  
FTP_AUTOSEEK Integer  
FTP_AUTORESUME Integer  
FTP_BINARY Integer  
FTP_FAILED Integer Asynchronous transfer has failed
FTP_FINISHED Integer Asynchronous transfer is completed
FTP_IMAGE Integer Alias of FTP_BINARY
FTP_MOREDATA Integer Asynchronous transfer is in progress
FTP_TEXT Integer Alias of FTP_ASCII
FTP_TIMEOUT_SEC Integer The timeout used for network operations
FTP_USEPASVADDRESS Boolean