text
stringlengths
1
254
output
stringlengths
2
255
(PHP 4 = 4.1.0)
(PHP 4 = 4.1.0)
This includes those created by extensions as well as those created with the define() function.
この関数は、現在定義されている全ての定数の名前と値を返します。返 される値には、拡張モジュールにより作成された定数や define() 関数で作成された定数も含まれます。
print_r (get_defined_constants());
例えば、以下の行を見てみましょう。
Prev
get_loaded_extensions() も参照下さい。
(PHP 4 = 4.0.4)
(PHP 4 = 4.0.4)
The internal functions will be accessible via $arr[ "internal"], and the user defined ones using $arr["user"] (see example below).
この関数は、組込(内部)関数およびユーザ定義関数を共に含む定義済み の全ての関数のリストを有する多次元配列を返します。内部関数は、 $arr["internal"] 、ユーザ定義関数は $arr["user"] によりアクセス可能となります。(以 下の例を参照)
Will output something along the lines of:
この例の出力は、以下のようになります。
Prev
get_defined_vars() も参照下さい。
Prev
(PHP 4 = 4.0.4)
This function returns an multidimensional array containing a list of all defined variables, be them environment, server or user-defined variables.
この関数は、環境変数、サーバ変数、ユーザが定義した変数を含む全て の定義済の変数のリストを有する多次元の配列を返します。
Prev
get_defined_functions() も参照下さい。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
$ip = getenv ("REMOTE_ADDR"); / / get the ip number of the user
varname が示す環境変数の値を返し、 エラーの場合は FALSE を返します。
You can find out what many of them mean by taking a look at the CGI specification, specifically the page on environmental variables.
phpinfo() を使用して全ての環境変数の一覧を見る ことができます。 CGI specification 、特に 環境変数のページ を参照すること により、それらの参照する環境変数の役割の多くを知ることができます。
See also putenv().
注意 この関数は、ISAPIモードでは動作しません。
get_required_files
putenv() も参照下さい。
Prev
(PHP 4)
This function returns the names of all the functions defined in the module indicated by module_name.
この関数は、 module_name で示したモジュール で定義された全ての関数の名前を返します。
print_r (get_extension_funcs ("xml")); print_r (get_extension_funcs ("gd"));
例えば以下のようになります。
Prev
get_loaded_extensions() も参照下さい。
Prev
(PHP 3, PHP 4)
Returns the host name of the Internet host specified by ip_address or a string containing the unmodified ip_address on failure.
ip_address で指定したインターネットホストの ホスト名を返します。エラーが発生した場合、 ip_address を返します。
Prev
gethostbyname() も参考にしてください。
Prev
(PHP 3, PHP 4)
Returns the IP address of the Internet host specified by hostname or a string containing the unmodified hostname on failure.
hostname で指定したインターネットホストの IPアドレスを返します。
Prev
gethostbyaddr() も参考にしてください。
Prev
(PHP 3, PHP 4)
Returns a list of IP addresses to which the Internet host specified by hostname resolves.
hostname で指定したインターネットホストを 検索して得られた IPアドレスのリストを返します。
Prev
gethostbyname(), gethostbyaddr(), checkdnsrr(), getmxrr() および named(8)マニュアルページも参考にしてください。
get_html_translation_table() will return the translation table that is used internally for htmlspecialchars() and htmlentities().
(PHP 4)
See the description of these modes in htmlspecialchars().
例 1変換テーブルの例
The cool thing is using array_flip() to change the direction of the translation.
逆方向の変換を行うには、 array_flip() を使用すると 良いでしょう。
See also htmlspecialchars(), htmlentities(), strtr(), and array_flip().
htmlspecialchars(), htmlentities(), strtr(), array_flip() も参照下さい。
Index 0 contains the width of the image in pixels.
(PHP 3, PHP 4)
These values correspond to the IMAGETYPE constants that were added in PHP 4.3.
GetImageSize() 関数は、任意の GIF 、 JPG 、 PNG 、 SWF ファイルの大きさを定義し、 ファイルの型と HTML IMG タグ中で通常使用される高さと幅からなる寸法を表す文字列を返します。
Beginning with PHP 4.3, bits and channels are present for other image types, too.
返り値は、4つの要素からなる配列です。0番目の要素は、ピクセル単位 での画像の幅です。1番目の要素は高さです。2番目の要素は画像の種類を 示すフラグです。1 = GIF、2 = JPG、3 = PNG、4 = SWFです。 3番目の要素はIMGタグで直接利用できる文字列 "height=xxx width=xxx" です。
Some formats may contain no image or may contain multiple images.
例 1GetImageSize (ファイル)
Beginning with PHP 4.3, getimagesize() also returns an additional parameter, mime, that corresponds with the MIME type of the image.
例 2GetImageSize (URL)
Currently, this will return the different JPG APP markers as an associative array.
例 3IPTC を返す GetImageSize
You can use the iptcparse() function to parse the binary APP13 marker into something readable.
注意 この関数は、GD画像ライブラリを必要としません。
?php $size = getimagesize ("testimg.jpg", $info); if (isset ($info["APP13"])) {$iptc = iptcparse ($info["APP13"]); var_dump ($iptc);}?
注意 URL のサポートは PHP 4.0.5 で追加されました。
(PHP 4)
(PHP 4)
Files that are included or required multiple times only show up once in the returned array.
この関数は、 include(), include_once(), require(), require_once() によりスクリプトにロードされた 全てのファイルの名前を配列として返します。
Files included using the auto_prepend_file configuration directive are not included in the returned array.
複数回読み込まれたファイルも返される配列には一度しかあらわれませ ん。
?php include( "test1.php"); include_once("test2.php"); require("test3.php"); require_once("test4.php"); $included_files = get_included_files(); foreach($included_files as $filename) {echo "$filename\n";}?
注意 設定ディレクティブ auto_prepend_file により読み 込まれたファイルは、返される配列には含まれません。
Note:
例 1 get_included_files() の例
The array returned by get_included_files() was an associative array and only listed files included by include() and include_once().
注意 PHP 4.0.1pl2および以前のバージョンにおいて、 get_included_files() は、読み込まれるファイル が拡張子 .php で終ることを仮定しており、他の拡 張子のファイルは返されませんでした。 get_included_files() により返される配列は、連 想配列であり、 include() および include_once() で読み込まれたファイルのみが一 覧に含まれていました。
Prev
include(), include_once(), require(), require_once(), get_required_files() も参照下さい。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
The value returned is a Unix timestamp, suitable for feeding to date().
現在のページが最後に更新された時刻を返します。返される 値は Unix のタイムスタンプで、そのまま date () に渡す事ができます。エラーの場合は FALSE を返します。
March 04 1998 20:43:59 .' echo "Last modified: ". date ("F d Y H:i:s .", getlastmod());?
例 1 getlastmod() の例
See also date(), getmyuid(), getmygid(), get_current_user(), getmyinode(), getmypid(), and filemtime().
date(), getmyuid(), get_current_user(), getmyinode(), getmypid() も参照して下さい。
For example the line below
(PHP 4)
Array ([0] = xml [1] = wddx [2] = standard [3] = session [4] = posix [5] = pgsql [6] = pcre [7] = gd [8] = ftp [9] = db [10] = calendar [11] = bcmath)
この関数は、PHPインタプリタにコンパイル、ロードされている全てのモ ジュールの名前を返します。
Prev
例えば以下のようになります。
get_included_files
get_extension_funcs() も参照下さい。
Returns the current active configuration setting of magic_quotes_gpc (0 for off, 1 for on).
(PHP 3 = 3.0.6, PHP 4)
So even when get_magic_quotes() returns TRUE neither double quotes, backslashes or NUL's will be escaped.
magic_quotes_gpc の現在アクティブな設定を返します。(オフの場合 0、オンの場合 1)
See also addslashes(), stripslashes(), get_magic_quotes_runtime(), and ini_get().
get_magic_quotes_runtime(), set_magic_quotes_runtime() も参照下さい。
Prev
(PHP 3 = 3.0.6, PHP 4)
Returns the current active configuration setting of magic_quotes_runtime (0 for off, 1 for on).
magic_quotes_runtime の現在アクティブな値を返します。 (オフの場合 0、オンの場合 1)
Prev
get_magic_quotes_gpc(), set_magic_quotes_runtime() も参照下さい。
(PHP 3 = 3.0.4, PHP 4)
(PHP 3 = 3.0.4, PHP 4)
This can be a local file or an URL.
Opens filename and parses it line by line for meta tags in the file. This can be a local file or an URL. The parsing stops at /head.
This is used for local files, not URLs.
Setting use_include_path to 1 will result in PHP trying to open the file along the standard include path as per the include_path directive. This is used for local files, not URLs.
What get_meta_tags() parses
例 1What get_meta_tags() parses
If two meta tags have the same name, only the last one is returned.
例 2What get_meta_tags() returns
As of PHP 4.0.5, get_meta_tags() supports unquoted html attributes.
注意 As of PHP 4.0.5, get_meta_tags() supports unquoted html attributes.
Prev
See also htmlentities() and urlencode().
(PHP 3, PHP 4)
(PHP 3, PHP 4)
Returns TRUE if any records are found; returns FALSE if no records were found or if an error occurred.
hostname に対応するMXレコードをDNSから探します。 何かレコードが見つかった場合に TRUE を返し、何も見つからないかエラーが 発生した場合に FALSE を返します。
If the weight array is given, it will be filled with the weight information gathered.
見つかったMXレコードのリストは、配列 mxhosts に収容されます。配列 weight が指定された場合、 得られた重み情報が代入されます。
See also checkdnsrr(), gethostbyname(), gethostbynamel(), gethostbyaddr(), and the named(8) manual page.
checkdnsrr(), gethostbyname(), gethostbynamel(), gethostbyaddr() および named(8)マニュアルページも参考にしてください。
Prev
(PHP 4 = 4.1.0)
Returns the group ID of the current script, or FALSE on error.
カレントのスクリプトのグループIDを返します。またはエラー時に FALSE を返します。
Prev
getmyuid(), getmypid(), get_current_user(), getmyinode(), getlastmod() も参照下さい。
Prev
(PHP 3, PHP 4)
Returns the current script 's inode, or FALSE on error.
現在のスクリプトのiノードを返し、エラーの場合は FALSE を返しま す。
Note:
getmygid(), getmyuid(), get_current_user(), getmypid(), getlastmod() も参照下さい。
Prev
注意 この関数はWindows環境にはまだ実装されていません。
Prev
(PHP 3, PHP 4)
Returns the current PHP process ID, or FALSE on error.
現在の PHP のプロセス ID を返し、エラーの場合は FALSE を返します。
We recommend against relying on pids in security-dependent contexts.
プロセスIDはユニークではないため、エントロピ源として優れたもので はありません。セキュリティが重要なコンテンツの場合、PIDに基づく 設計は推奨されません。
Prev
getmygid(), getmyuid(), get_current_user(), getmyinode(), getlastmod() も参照下さい。
Prev
(PHP 3, PHP 4)
Returns the user ID of the current script, or FALSE on error.
現在のスクリプトのユーザ ID を返し、エラーの場合は FALSE を返します。
Prev
getmygid(), getmypid(), get_current_user(), getmyinode(), getlastmod() も参照下さい。
This function returns an associative array of defined object properties for the specified object obj.
(PHP 4)
In versions after PHP 4.2.0, the key will be assigned with a NULL value.
この関数は、指定したオブジェクト obj の オブジェクトプロパティを配列として返します。 obj をインスタンスとするクラスで宣言された 変数が値を有していない場合、これらの変数は配列として返されません。
Array ([x] = 1.233 [y] = 3.445 [label] =) Array ([x] = 1.233 [y] = 3.445 [label] = point #1)
例 1 get_object_vars() の使用例
Prev
get_class_methods() 、 get_class_vars() も参照下さい。
(PHP 4 = 4.3.0)
(PHP 4 = 4.3.0)
$options = getopt( "f:hp :"); / / parse the command line ($_GLOBALS['argv'])
Returns an associative array of option / argument pairs based on the options format specified in options, or FALSE on an error.
If an option does not have an argument, the value will be set to FALSE.
This function will return an array of option / argument pairs. If an option does not have an argument, the value will be set to FALSE.
Prev
注意 This function is currently not available on Windows
Prev
(PHP 4)
If obj is an object, returns the name of the parent class of the class of which obj is an instance.
obj がオブジェクトの場合、 obj がインスタンスであるクラスの親クラスの 名前を返します。
This functionality was added in PHP 4.0.5.
obj が文字列の場合、これを名前とするクラス の親クラスの名前を返します。この機能は、PHP 4.0.5で追加されました。
Prev
get_class() 、 is_subclass_of() も参照下さい。
Prev
(PHP 4)