text
stringlengths
1
254
output
stringlengths
2
255
This is enabled by default.
表 1サポートされる実行時FTPオプション
/ / Set the network timeout to 10 seconds ftp_set_option( $conn_id, FTP_TIMEOUT_SEC, 10);
例 1 ftp_set_option() の例
ftp_site() sends the command specified by cmd to the FTP server.
(PHP 3 = 3.0.15, PHP 4)
They are useful for handling such things as file permissions and group membership.
ftp_site() は cmd で 指定されたコマンドをFTPサーバーに送信します。SITEコマンドは 規格が統一されていないため、サーバーにより仕様が異なります. ファイルのパーミッションやグループメンバーの設定のような 処理を行う際には有用です。
Prev
成功時に TRUE 、エラー発生時に FALSE を返します。
(PHP 3 = 3.0.13, PHP 4)
(PHP 3 = 3.0.13, PHP 4)
If an error occurs, of if the file does not exist, -1 is returned.
ftp_size() はファイルのサイズを返します。エラー を生じた場合、またはファイルが存在しない場合、 -1 が返されます。 全てのサーバーがこの機能をサポートしているわけではないことに注意 してください。
Returns the file size on success, or -1 on error.
成功時にファイルのサイズ、エラー時に -1 を返します。
Prev
(PHP 4 = 4.3.0)
Returns a SSL-FTP stream on success or FALSE on error.
成功時にSSL-FTPストリーム、エラーの場合に FALSE を返します。
The port The port parameter specifies an alternate port to connect to.
ftp_ssl_connect() は、指定した host へのSSL-FTP接続をオープンします。 port パラメータは別のポートに接続することを 指定します。これを省略するか0にした場合、デフォルトのFTPポート、 つまり、21が使用されます。
The timeout parameter specifies the timeout for all subsequent network operations.
パラメータ timeout は、以降の全ての ネットワーク処理のタイムアウトを指定します。省略された場合、 デフォルト値は、90秒となります。timeoutは、 ftp_set_option() および ftp_get_option() で いつでも変更および取得可能です。
If it' s undefined and you've compiled FTP support then this is why.
この関数が存在しないことがあるのはなぜですか? ftp_ssl_connect() は、 OpenSSL サポートがあなたの使っている PHP で有効になっているときにのみ使うことができます。 FTP サポートを有効にしているにもかかわらず この関数が定義されていないのは、それが理由です。
Prev
ftp_connect() も参照下さい。
Prev
(PHP 3 = 3.0.13, PHP 4)
Returns the remote system type, or FALSE on error.
リモートシステム型を返します。エラー時には FALSE を返します。
(PHP 4)
(PHP 4)
Returns TRUE on success or FALSE on failure.
ファイルポインタfpを引数とし、ファイルを指定した長さ、サイズに丸めます。 この関数は成功時に TRUE 、失敗時に FALSE を返します。
(PHP 4)
(PHP 4)
Function arguments are counted starting from zero. func_get_arg() will generate a warning if called from outside of a function definition.
ユーザーが定義した関数の引数リストで arg_num 番目の引数を返します。関数の引数はゼロから数えられます。 func_get_arg() は関数定義以外の場所で コールされた場合に警告を発生します。
If arg_num is greater than the number of arguments actually passed, a warning will be generated and func_get_arg() will return FALSE.
arg_num が実際に渡された引数の数よりも大き い場合は警告を発生し、 func_get_arg() はFALSEを 返します。
func_get_arg() may be used in conjunction with func_num_args() and func_get_args() to allow user-defined functions to accept variable-length argument lists.
func_get_arg() は func_num_args() および func_get_args() と組み合わせて使用され、これにより ユーザ定義の関数が可変長の引数リストをとることができるようになります。
Prev
注意 この関数はPHP4で追加されました。
Prev
(PHP 4)
Returns an array in which each element is the corresponding member of the current user-defined function' s argument list. func_get_args() will generate a warning if called from outside of a function definition.
各要素がユーザ定義関数の引数リストの各メンバーに対応する配列を 返します。 func_get_args() は関数定義部以外でコールされた 場合に警告を発生します。
func_get_args() may be used in conjunction with func_num_args() and func_get_arg() to allow user-defined functions to accept variable-length argument lists.
func_get_args() は func_num_args() および func_get_arg() と組み合わせて使用され、 これによりユーザ定義の章において可変長の引数リストを使用することが できるようになります。
Prev
注意 この関数はPHP4で追加されました。
(PHP 4)
(PHP 4)
Returns the number of arguments passed into the current user-defined function. func_num_args() will generate a warning if called from outside of a user-defined function.
カレントのユーザ定義関数に渡された引数の数を返します。 func_num_args() は関数定義部以外でコールされた 場合に警告を発生します。
func_num_args() may be used in conjunction with func_get_arg() and func_get_args() to allow user-defined functions to accept variable-length argument lists.
func_num_args() は func_get_arg() および func_get_args() と組み合わせて使用され、 ユーザ定義関数において可変長の引数リストを使用することができるようになります。
func_get_args
注意 この関数はPHP4で追加されました。
Checks the list of defined functions, both built-in (internal) and user-defined, for function_name.
(PHP 3 = 3.0.7, PHP 4)
if (function_exists('imap_open')) {echo "IMAP functions are available. br \n";} else {echo "IMAP functions are not available. br \n";}
function_name について定義された関数のリス トを確認します。指定した関数名がある場合に TRUE 、他の場合に FALSE を 返します。
Prev
method_exists() も参照下さい。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
If the length argument is given, writing will stop after length bytes have been written or the end of string is reached, whichever comes first.
fwrite() は string の内容を fp が指しているファイル・ストリームに書き込み ます。 length パラメータが与えられている場合、 length バイト数分の書き込みが完了したか、 string が終わりに達したかのいずれか早い方の 事象により書き込みは中止されます。
fwrite() returns the number of bytes written, or FALSE on error.
fwrite() は書き込んだバイト数、またはエラー時に- 1を返します。
Note:
length パラメータが指定されている場合、 magic_quotes_runtime 構成オプションは無視され、 string からの スラッシュ文字の取り除きは行われないことに注意して下さい。
Windows) the file must be opened with'b 'included in fopen() mode parameter.
注意 (Windowsのように)バイナリとテキストファイルの形式が異なるシステ ムにおいては、ファイルをオープンする際に fopen() の mode パラメータに 'b' を指定する必 要があります。
Prev
fread(), fopen(), fsockopen(), popen(), fputs() も参照下さい。
Returns an associative array describing the version and capabilities of the installed GD library.
(PHP 4 = 4.3.0)
Expected values are: 'with freetype', 'with TTF library', and'with unknown library'.
Returns an associative array describing the version and capabilities of the installed GD library.
T1Lib Support
表 1Elements of array returned by gd_info()
GIF Create Support
例 1Using gd_info()
Prev
See also: imagepng(), imagejpeg(), imagegif(), imagewbmp(), and imagetypes().
getallheaders() is an alias for apache_request_headers().
(PHP 3, PHP 4)
Please read the apache_request_headers() documentation for more information on how this function works.
getallheaders() は、 apache_request_headers() のエイリアスです。 この関数は、カレントのリクエストにおける全てのHTTPヘッダーを有する 連想配列を返します。この関数の動作に関する詳細については、 apache_request_headers() のドキュメントを参照して 下さい。
Essentially, it was renamed.
注意 PHP 4.3.0で、 getallheaders() は、 apache_request_headers() のエイリアスとなりまし た。これは、基本的に関数名の変更にあたり、この関数が PHPが Apache モジュールとしてコンパイルさ れた場合のみ動作するために変更が行われています。
See also apache_request_headers().
apache_request_headers() も参照して下さい。
get_browser() attempts to determine the capabilities of the user's browser.
(PHP 3, PHP 4)
By default, the value of HTTP_USER_AGENT is used; however, you can alter this (i.e., look up another browser's info) by passing the optional user_agent parameter to get_browser().
get_browser() は、ユーザーのブラウザの機能を定 義します。これは、 browscap.ini ファイルのブラ ウザ情報を調べることにより行います。デフォルトでは、 $HTTP_USER_AGENTの値が使用されます。しかし、オプションの user_agent パラメータを get_browser() に渡すことにより、これを変える (すなわち、他のブラウザの情報を調べる)ことが可能です。
While browscap.ini contains information on many browsers, it relies on user updates to keep the database current.
返される情報はオブジェクトであり、例えば、ブラウザのメジャーおよ びマイナーバージョン暗号やID文字列、といった様々なデータ要素を含 んでいます。フレーム、JavaScript、クッキー等のような機能に関する TRUE /false の値、マイナーバージョン暗号やID文字列、といった様々な データ要素を含んでいます。
The following example shows how one might list all available information retrieved about the user 's browser.
browscap.ini は多くのブラウザに関する情報を 有していますが、データベースを最新に保つのはユーザーによる更新 に依存しています。 ファイルのフォーマット自体を見ればおおよそのことがわかります。
The output of the above script would look something like this:
次の例では、ユーザーのブラウザに関する全ての取得可能な情報 の一覧を作成する手法に関するものです。
In order for this to work, your browscap configuration setting in php.ini must point to the correct location of the browscap.ini file on your system. browscap.ini is not bundled with PHP but you may find an up-to-date browscap.ini file here.
例 1 get_browser() の例
Note:
上のスクリプトの出力は、次のようになります。
The only way to test if cookies are accepted is to set one with setcookie(), reload, and check for the value.
これを動作させるためには、設定ファイルの browscap を正しく browscap.ini の場所に設定しておく必要があります。
In this case, you will pass in $HTTP_SERVER_VARS[ 'HTTP_USER_AGENT'].
(browscap.ini ファイルを取得できる場所を含む) より詳細な情報については、 http://www.php.net/FAQ.php にあるPHP FAQを参照下さい。
Prev
(PHP 3, PHP 4)
Returns the current value of the PHP configuration variable specified by varname, or FALSE if an error occurs.
varname で指定された PHP 設定オプション の現在の値を返し、エラーの場合は FALSE を返します。
It will not return configuration information set when the PHP was compiled, or read from an Apache configuration file (using the php3_configuration_option directives).
この関数は、 PHP がコンパイルされた際にセットされた設定情報や Apache の設定ファイルから(php3_configuration_option 命令により) 読んだ設定情報は返しません。
If this is available, a configuration file is being used.
システムが 設定ファイル を使用しているかどうかを確認するには、cfg_file_path の設定値を 取得してみて下さい。 この値が利用可能なら、設定ファイルが使用されています。
Prev
ini_get() も参照下さい。
(PHP 4)
(PHP 4)
Returns FALSE if obj is not an object.
このクラスはオブジェクト obj がインスタンス であるクラスの名前を返します。
See also get_parent_class(), gettype(), and is_subclass_of().
get_parent_class() 、 get_type() 、 is_subclass_of() も参照下さい。
Prev
(PHP 4)
This function returns an array of method names defined for the class specified by class_name.
この関数は、指定したクラス class_name に ついてメソッドの名前を連想配列として返します。
For example:
注意 PHP 4.0.6 以降では、 class_name の替わりに オブジェクト自身を指定することが可能です。例えば、
Example 1. get_class_methods() example
例 1 get_class_methods() の例
myclass myfunc1 myfunc2
上の例の出力は次のようになります。
Prev
get_class_vars() 、 get_object_vars() も参照下さい。
(PHP 4)
(PHP 4)
The resulting array elements are in the form of varname = value.
この関数は、クラスのデフォルトプロパティを有する連想配列を返しま す。返される配列要素は、 変数名 = 値 の形 式となります。
Example 1. get_class_vars() example
注意 初期化されていないクラス変数は、 get_class_vars() で返されません。
/ / Before PHP 4.2.0 var2: xyz var3:
例 1 get_class_vars() の例
100
この例の出力は次のようになります。
Prev
get_class_methods() 、 get_object_vars() も参照下さい。
Prev
(PHP 3, PHP 4)
Returns the name of the owner of the current PHP script.
現在の PHP スクリプトの所有者の名前を返します。
Prev
getmyuid(), getmypid(), getmyinode(), getlastmod() も参照して下さい。
(PHP 4)
(PHP 4)
See also chdir().
カレントのワーキングディレクトリを返します。
Prev
(PHP 3, PHP 4)
Returns an associative array containing the date information of the timestamp, or the current local time if no timestamp is given, as the following array elements:
timestamp に関する日付情報を有する連想配列を 返します。timestampが指定されない場合は、現在のローカルな時間に関 する情報を返します。日付情報は以下の配列要素として返されます。
"seconds" - seconds
"seconds" - 秒
"hours" - hours
"minutes" - 分
"mday" - day of the month
"hours" - 時
"wday" - day of the week, numeric: from 0 as Sunday up to 6 as Saturday
"mday" - 月単位の日付
"year" - year, numeric
"wday" - 曜日、数字: 0が日曜、6が土曜日
"yday" - day of the year, numeric; i.e. "299 "
"mon" - 月、数字
"weekday" - day of the week, textual, full; i.e. "Friday "
"year" - 年、数字
Example 1. getdate() example
"yday" - 年単位の日付、数字。たとえば "299"
Prev
"weekday" - 曜日(テキスト)。たとえば "Friday"
Next
"month" - 月(テキスト)。たとえば "January"
gettimeofday
例 1 getdate() の例
Prev
(PHP 4)
This function returns an array of the names of the declared classes in the current script.
この関数は、カレントのスクリプトで宣言されたクラスの名前の配列を 返します。
Also note that depending on what libraries you have compiled into PHP, additional classes could be present.
注意 PHP 4.0.1pl2では、この他に次の3つのクラスが配列の先頭に返されま す。: stdClass (Zend/zend.c で定義)、 OverloadedTestClass (ext/standard/basic_functions.c で定義)、 Directory (ext/standard/dir.c で定義)
There is a list of predefined classes in the Predefined Classes section of the appendices.
PHPにコンパイルされているライブラリの種類に依存して、他のクラス も存在する可能性があることにも注意して下さい。