text
stringlengths 1
254
| output
stringlengths 2
255
|
---|---|
$tmpfname = tempnam ("/ tmp", "FOO"); $handle = fopen($tmpfname, "w"); fwrite($handle, "writing to tempfile"); fclose($handle); / / do here something unlink($tmpfname);
|
新しいテンポラリファイル名を返し、失敗した場合には FALSE を返しま す。
|
This function 's behavior changed in 4.0.3.
|
例 1 tempnam() の例
|
Note, that you need to remove the file in case you need it no more, it is not done automatically.
|
注意 この関数の動作は、4.0.3 で変更され、文字列が生成された時間の間や スクリプトがファイルの作成にとりかかる前にファイルシステムに現れ る可能性がある場合のファイルとの競合を回避するためにもテンポラリ ファイルは作成されます。このファイルは自動的に削除されないため、 不要となった場合にはこのファイルを削除する必要があることに注意し て下さい。
|
Prev
|
tmpfile(), unlink() も参照下 さい。
|
(PHP 3 = 3.0.7, PHP 4)
|
(PHP 3 = 3.0.7, PHP 4)
|
The previous default domain is returned.
|
この関数は、 gettext() がコールされた際に検索を 行うドメインを設定します。このドメインは、通常、アプリケーション 名が後に付きます。前のデフォルトドメインが返されます。現在のドメ イン設定を変更せずに値を取得するには、パラメータにNULLを指定して この関数をコールして下さい。
|
Prev
|
(PHP 3, PHP 4)
|
Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
|
現在時刻をUnix epoch(1970年1月1日 00:00:00 GMT))からの通算秒 として返します。
|
Prev
|
date() も参照下さい。
|
(PHP 3 = 3.0.13, PHP 4)
|
(PHP 3 = 3.0.13, PHP 4)
|
The file is automatically removed when closed (using fclose()), or when the script ends.
|
書き込み可のモードでユニークな名前を有するテンポラリファイルを作 成し、ファイルハンドルを返します。これは、 fopen() により返されるハンドルと同じものです。 ファイルは、( fclose() を用いて)クローズされた際 またはスクリプトが終了された際に自動的に削除されます。
|
Example 1. tmpfile() example
|
詳細については、関数 tmpfile(3) のシステムドキュ メントおよびヘッダファイル stdio.h を参照下さ い。
|
See also tempnam().
|
例 1 tmpfile() の例
|
Home
|
tempnam() も参照下さい。
|
This function is EXPERIMENTAL.
|
(PHP 4 = 4.2.0)
|
Use this function at your own risk.
|
この関数は、 実験的 なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。
|
Prev
|
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
|
This function is EXPERIMENTAL.
|
(PHP 4 = 4.2.0)
|
Use this function at your own risk.
|
この関数は、 実験的 なステータスにあります。これは、この関数の 動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告 なく変更される可能性があることを意味します。注意を喚起するとともに自分 のリスクでこの関数を使用して下さい。
|
Prev
|
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
|
If the option time is not given, uses the present time.
|
(PHP 3, PHP 4)
|
If the third option atime is present, the access time of the given filename is set to the value of atime.
|
filename で指定されたファイルの 最終更新日を、 time で指定された値に セットしようと試みます。オプションのtimeが指定されない場合、 現在時刻を使用します。
|
If the file does not exist, it is created.
|
ファイルが存在しない場合、ファイルが生成されます。
|
if (touch ($FileName)) {print "$FileName modification time has been changed to todays date and time";} else {print "Sorry Could Not change modification time of $FileName";}
|
成功すると TRUE 、そうでない場合に FALSE を返します。
|
Home
|
例 1 touch() の例
|
(PHP 4 = 4.0.1)
|
(PHP 4 = 4.0.1)
|
It only works with the E_USER family of constants, and will default to E_USER_NOTICE.
|
ユーザエラーを発生するために使用され、組込のエラーハンドラまたは 新しいエラーハンドラ( set_error_handler() )とし て設定済のユーザ定義関数と組み合わせて使用されます。エラー型には E_USER 関連の定数のみが使用可能で、デフォルトは E_USER_NOTICE となっています。
|
For example:
|
この関数は、実行時の例外に特定の応答を生成する必要がある場合に有 用です。以下に例を示します。
|
Note:
|
注意 より、詳細な例については、 set_error_handler() を参照下さい。
|
See also error_reporting(), set_error_handler(), restore_error_handler(), user_error()
|
error_reporting(), set_error_handler(), restore_error_handler(), user_error() も参照下さい。
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
The optional charlist parameter was added in PHP 4.1.0
|
注意 オプションの charlist パラメータは、PHP 4.1.0で追加されました。
|
Without the second parameter, trim() will strip these characters:
|
この関数は文字列の最初および最後から空白文字を取り除き、 取り除かれた文字列を返します。2番目のパラメータを指定しない場合、 trim() は以下の文字を削除します。
|
"\t" (ASCII 9 (0x09)), a tab.
|
"" (ASCII 32 (0x20)), 通常の空白。
|
"\r" (ASCII 13 (0x0D)), a carriage return.
|
"\t" (ASCII 9 (0x09)), タブ。
|
"\x0B" (ASCII 11 (0x0B)), a vertical tab.
|
"\n" (ASCII 13 (0x0D)), 改行。
|
You can also specify the characters you want to strip, by means of the charlist You can also specify the characters you want to strip, by means of the charlist parameter.
|
"\r" (ASCII 10 (0x0A)), リターン。
|
With.. you can specify a range of characters.
|
"\0" (ASCII 0 (0x00)), NUL バイト
|
Usage example of trim()
|
"\x0B" (ASCII 11 (0x0B)), a.
|
See also ltrim() and rtrim().
|
charlist パラメータにより、削除する 文字を指定することも可能です。削除したい全ての文字をリストに して下さい。.. を文字の範囲を指定する際に 使用可能です。
|
Home
|
例 1 trim() の使用例
|
substr
|
ltrim() および rtrim() も 参照下さい。
|
(PHP 3 = 3.0.4, PHP 4)
|
(PHP 3 = 3.0.4, PHP 4)
|
This is used mainly when sorting associative arrays where the actual element order is significant.
|
この関数は、配列インデックスが関連する配列要素との関係を保持する ような配列をソートします。 主に実際の配列の順序に意味がある連想配列をソートするために この関数は使用されます。比較関数はユーザーが定義します。
|
Please see usort() and uksort() for examples of user-defined comparison functions.
|
注意 ユーザ定義の比較関数の例については、 usort() および uksort() を 参照下さい。
|
See also usort(), uksort(), sort(), asort(), arsort(), ksort(), and rsort().
|
注意 関数名の代わりに、オブジェクトへのリファレンスを格納した配列とメソッド名を指定することも出来ます。
|
sort
|
usort(), uksort(), sort(), asort(), arsort(), ksort(), rsort(), natsort() も参照下さい。
|
Returns a string with the first character of str capitalized, if that character is alphabetic.
|
(PHP 3, PHP 4)
|
For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted.
|
str の最初の文字がアルファベットであれば、 それを大文字にします。
|
$foo = 'hello world !'; $foo = ucfirst($foo); / / Hello world! $bar = 'HELLO WORLD !'; $bar = ucfirst($bar); / / HELLO WORLD! $bar = ucfirst(strtolower($bar)); / / Hello world!
|
「アルファベット」かどうかというのは現在のロケールにより決定 されます。たとえば、デフォルトの "C" ロケールでは、ウムラウトa (ä)は変換されません。
|
Prev
|
例 1 ucfirst() の例
|
ucwords
|
strtoupper(), strtolower(), ucwords() も参照下さい。
|
Prev
|
(PHP 3 = 3.0.3, PHP 4)
|
Returns a string with the first character of each word in str capitalized, if that character is alphabetic.
|
文字がアルファベットの場合、 str の各単語の 最初の文字を大文字にします。
|
$foo = 'hello world !'; $foo = ucwords($foo); / / Hello World! $bar = 'HELLO WORLD !'; $bar = ucwords($bar); / / HELLO WORLD! $bar = ucwords(strtolower($bar)); / / Hello World!
|
例 1 ucwords() の例
|
The definition of a word is any string of characters that is immediately after a whitespace (These are: space, form-feed, newline, carriage return, horizontal tab, and vertical tab).
|
注意 単語の定義は、空白文字(空白、フォームフィード、改行、復改、水平 タブ、垂直タブ)の直後にあるあらゆる文字からなる文字列です。
|
Prev
|
strtoupper(), strtolower(), ucfirst() も参照下さい。
|
var - defines parameter, indicating limit.
|
(PHP 4 = 4.0.5)
|
It supports SQL% and _ LIKE wildcards, where% matches any number of characters, even zero characters, and _ matches exactly one character.
|
udm_add_search_limit() は、成功時に TRUE 、エラー時に FALSE を返し ます。検索の制約を追加します。
|
UDM_LIMIT_TAG - defines site TAG limitations.
|
agent - udm_alloc_agent() から返されたエージェントへの リンク
|
Tags in mnoGoSearch 3.1.x are lines, that may contain metasymbols% and _.
|
var - パラメータを定義、制限を示す。
|
UDM_LIMIT_LANG - defines document language limitations.
|
val - カレントのパラメータの値を定義
|
If it has a subcategory like 'Ford', then it would be 01 (the parent category) and then'Ford' which we will give 01.
|
使用可能な var の値は次のようになります。
|
If 'Auto' had another subcategory named'VW', then it's id would be 01 because it belongs to the'Ford 'category and then 02 because it's the next category.
|
UDM_LIMIT_URL - データベースのサブセクションにおける検索を制限 するためにドキュメントURLに制限を課します。この機能は、SQL の% および _ LIKE ワイルドカードをサポートします。ただし、% は、(ゼ ロを含む)任意の数の文字の並びで、 _ は1文字だけにマッチします。 例えば、http://my.domain.__/catalog は http://my.domain.ru/catalog および http://my.domain.ua/catalog を表すことが可能です。
|
If you want to search for sites under that category then you pass it cat=010201 in the url.
|
UDM_LIMIT_TAG - サイトTAG制約を定義します。indexer-confにおいて特 定のTAGを様々なサイトやあるサイトの一部に割り付けることが可能です。 mnoGoSearch 3.1.x のタグは複数行とすることが可能で、メタ記号% および _ を含むことが可能です。メタ記号は、タグ集合により中から の検索が可能となります。例えば、ABCDおよびABCEを有するリンクが あり、検索の制約がABC_であるとすると、この検索は両方のタグにつ いて行われます。
|
Format of parameter value: a string with first character or, then with no space - date in unixtime format, for example:
|
UDM_LIMIT_LANG - ドキュメントの言語に関する制限を定義します。
|
(PHP 4 = 4.0.5)
|
(PHP 4 = 4.0.5)
|
This function creates a session with database parameters.
|
udm_alloc_agent() は、成功時にmnogosearchエー ジェントID、エラー時に FALSE を返します。この関数は、データベース パラメータを有するセッションを生成します。
|
Actual connection to database and login / password verification is done by udm_find().
|
注意 dbaddr および dbmode は、インデックス作成時に使用される これらの選択子に一致している必要があります。
|
udm_add_search_limit
|
注意 実際、これらの関数はデータベースへの接続をオープンする必要はなく、 よって、ログイン名やパスワードを確認しません。実際のデータベース への接続およびログイン/パスワード認証は、 udm_find() で行われます。
|
udm_api_version() returns mnoGoSearch API version number.
|
(PHP 4 = 4.0.5)
|
This function allows user to identify which API functions are available, e.g. udm_get_doc_count() function is only available in mnoGoSearch 3.1.11 or later.
|
udm_api_version() は、mnoGoSearch APIバージョン 番号を返します。例えば、mnoGoSearch 3.1.10 APIを使用している場合、 この関数は、 30110 を返します。
|
if (udm_api_version() = 30111) {print "Total number of urls in database: ".udm_get_doc_count($udm). "br \n";}
|
この関数により利用可能なAPI関数をユーザが調べることが可能となりま す。例えば、 udm_get_doc_count() 関数は mnoGoSearch 3.1.11以降でのみ利用可能です。
|
udm_alloc_agent
|
例:
|
Prev
|
(PHP 4 = 4.0.6)
|
udm_cat_list() returns array listing all categories of the same level as current category in the categories tree.
|
udm_cat_list() は、カテゴリツリーの中のカレント カテゴリと同じレベルの全てのカテゴリの一覧を配列として返します。
|
Returns array with the following format:
|
この関数は、カテゴリツリーのブラウザを開発する際に有用です。
|
Elements with even index numbers contain category paths, odd elements contain corresponding category names.
|
以下の形式で配列を返します。
|
Following is an example of displaying links of the current level in format:
|
組から構成される配列。偶数添字番号の要素にはカテゴリパス、奇数要 素には、対応するカテゴリ名が含まれます。
|
?php $cat_list_arr = udm_cat_list( $udm_agent,$cat); $cat_list = ''; for ($i=0; $i count($cat_list_arr); $i+=2) {$path = $cat_list_arr[$i]; $name = $cat_list_arr[$i+1]; $cat_list .= "a href=\"$PHP_SELF?cat=$path\" $name / a br ";}?
|
$array[0] will contain '020300' $array[1] will contain 'Audi' $array[2] will contain '020301' $array[3] will contain 'BMW' $array[4] will contain '020302' $array[5] will contain 'Opel'... etc.
|
udm_api_version
|
以下は、カレントのレベルのリンクをこの形式で表示する例です。 Audi BMW Opel...
|
Prev
|
(PHP 4 = 4.0.6)
|
udm_cat_path() returns array describing path in the categories tree from the tree root to the current category.
|
udm_cat_path() は、ツリールートからカレントのカ テゴリへのカテゴリツリーの中の既述パスを含む配列を返します。
|
category - current category - the one to get path to.
|
agent - エージェントリンクID。
|
The array consists of pairs.
|
category - カレントのカテゴリ - パスを得よ うとするカテゴリ。
|
Elements with even index numbers contain category paths, odd elements contain corresponding category names.
|
以下の形式の配列を返します。
|
$array[ 0] will contain '' $array[1] will contain'Root '$array[2] will contain '02' $array[3] will contain'Sport '$array[4] will contain '0203' $array[5] will contain'Auto '$array[4] will contain '02031D' $array[5] will contain'Ferrari '
|
組から構成される配列。偶数添字番号の要素にはカテゴリパス、奇数要 素には、対応するカテゴリ名が含まれます。
|
Specifying path to the current category in the following format: 'Root Sport Auto Ferrari'
|
例えば、 $array=udm_cat_path($agent, '02031D'); とコールすると、以下の配列が返されます。
|
Prev
|
$array[0] will contain ''$array[1] will contain 'Root' $array[2] will contain '02' $array[3] will contain 'Sport' $array[4] will contain '0203' $array[5] will contain 'Auto' $array[4] will contain '02031D' $array[5] will contain 'Ferrari'
|
udm_check_charset
|
例 1 カレントのカテゴリへのパスは以下の形式で指定します。 'Root Sport Auto Ferrari'
|
Warning
|
(PHP 4 = 4.2.0)
|
Prev
|
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
|
Warning
|
(PHP 4 = 4.2.0)
|
Prev
|
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
|
Prev
|
(PHP 4 = 4.0.5)
|
udm_clear_search_limits() resets defined search limitations and returns TRUE.
|
udm_clear_search_limits() は、検索に関する制約 をリセットし、 TRUE を返します。
|
Warning
|
(PHP 4 = 4.2.0)
|
Prev
|
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
|
Warning
|
(PHP 4 = 4.2.0)
|
Prev
|
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.