text
stringlengths
1
254
output
stringlengths
2
255
If the delimiter character has to be used in the expression itself, it needs to be escaped by backslash.
マッチングに影響を与える様々な修飾子を終端デリミタの後に付ける ことができます。 パターン修飾子 を参照下さい。
The ending delimiter may be followed by various modifiers that affect the matching.
PHPは、 POSIX拡張正規表現関数 を用 いてPOSIX拡張構文を用いる正規表現もサポートしています。
Regular expression support is provided by the PCRE library package, which is open source software, written by Philip Hazel, and copyright by the University of Cambridge, England.
正規表現は、Philip Hazelで書かれ、the University of Cambridge, Englandに著作権があるオープンソースソフトウエアのPCREライブラリパッ ケージでサポートされます。PCREは、 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ で取得可能です。
For older versions you have to configure and compile PHP with --with-pcre-regex[ =DIR] in order to use these functions.
PHP 4.0.2以降、以下の関数はデフォルトで有効となっています。 --without-pcre-regex でPCRE関数を無 効にすることができます。これ以前のバージョンでは、この関数を使用する ために --with-pcre-regex[=DIR] を指 定してPHPをconfigureおよびコンパイルする必要があります。
You do not need to load any additional extension in order to use these functions.
Windows版の PHP にはこの拡張モジュールのサポートが組み込まれています。これらの関数を使用するために拡張モジュールを追加でロードする必要はありません。
This extension has no resource types defined.
この拡張モジュールは設定ディレクティブを全く 定義しません。
Table 1.
この拡張モジュールはリソース型を全く定義し ません。
This flag is only used with preg_match_all().
これらの定数は、この拡張モジュールで定義されており、 この拡張モジュールがPHP内部にコンパイルされているか実行時に動的にロー ドされるかのどちらかの場合のみ使用可能です。
Orders results so that $matches[ 0] is an array of first set of matches, $matches[1] is an array of second set of matches, and so on.
表 1PREG定数
PREG_OFFSET_CAPTURE
例 1有効なパターンの例
This flag is available since PHP 4.3.0.
/ \/\w+ /
This flag tells preg_split() to only return only non-empty pieces.
_BAR_(\d{3})-\d+_BAR_Sm
This flag tells preg_split() to capture parenthesized expression in the delimiter pattern as well.
/^(?i)php[34]/
PREG_SPLIT_OFFSET_CAPTURE
{^\s+(\s+)?$}
Note that this changes the return value in an array where very element is an array consisting of the matched string at offset 0 and it 's string offset into subject at offset 1.
例 2無効なパターンの例
Example 1.
/href='(.*)' - 終端デリミタが抜けている
/href=' (.*) '- missing ending delimiter
/\w+\s*\w+/J - 未知の修飾子 'J'
1-\d3-\d3-\d4 _BAR_ - missing starting delimiter
1-\d3-\d3-\d4_BAR_ - 始端デリミタが抜けている
The documentation in this section is only meant to be an overview of the available functions in the PDFlib library and should not be considered an exhaustive reference.
PHPのPDF関数は、 Thomas Merz により作成されたPDFlibライブラリを使用してPDFファイル を作成することが可能です。
It provides a very good overview of what PDFlib is capable of doing and contains the most up-to-date documentation of all functions.
本節のドキュメントは、PDFlibライブラリで利用可能な関数の概要のみ を説明することを意図しています。ここで扱う各関すの完全で詳細な説 明については、PDFlibのソース配布ファイルと共に配布されているドキュ メントを参照下さい。このドキュメントは、PDFlib の機能に関 する概要を非常に良くまとめており、全ての関数に関する最新のドキュ メントが含まれています。
You will need to understand some of the basic concepts of PDF and PostScript to efficiently use this extension.
PDFlibのほとんどの関数とPHPモジュール内の関数の名前とパラメータは 共通になっています。このモジュールを効率的に使用するには、PDFまた はPostScriptに関する基本的な考え方も理解しておく必要があります。 全ての長さと座標は、Postscriptのポイント数で計られます。通常、1イ ンチ当たり72 Postscript ポイントですが、これは、出力解像度に依存 します。使用する座表系に関するより詳細な説明については、PDFlibの ソース配布に含まれるPDFlibドキュメントを参照下さい。
Please see the PDFlib documentation included with the source distribution of PDFlib for a more thorough explanation of the coordinate system used.
ほとんど全てのPDF関数は、最初の引数パラメータとして pdf object を必要とすることに注意して下さ い。より詳細な情報については以下の例を参照下さい。
The JPEG and TIFF libraries are required to compile this extension.
PDFlibは、 http://www.pdflib.com/pdflib/index.html でダウンロード 可能ですが、商用で使用する場合はライセンスを購入する必要がありま す。この拡張モジュールをコンパイルするには、 JPEG および TIFF が必要です。
PDFlib 3.0 or greater is supported by PHP 3.0.19 and later.
2000年3月9日以降のバージョンのPHPでは、3.0より古いバージョンの PDFlibをサポートしていません。
DIR is the PDFlib base install directory, defaults to / usr / local.
PDFlib 3.0以降が、PHP 3.0.19以降でサポートされています。
This extension has no configuration directives defined in php.ini.
バージョン3.xのPDFlibを使用する場合、PDFlibのconfigureのオプションに --enable-shared-pdflib を指定する必要があります。
This means that all the functions described in the PDFlib manual (V3.00 or greater) are supported by PHP 4 with exactly the same meaning and the same parameters.
この拡張モジュールは設定ディレクティブを全く 定義しません。
pdf_get_image_height()
表 1古い関数と代替関数
Most of the functions are fairly easy to use.
多くの関数の使用法は簡単です。最も困難なのは、非常に簡単なpdfドキュ メントを作成する場合でしょう。次の例は、入門の際の助けとなるはず です。この例では、1ページを有するファイル test.pdf が作成されます。このページには、30ポ イントのアウトラインフォントでテキスト"Times-Roman outlined"が描 かれます。このテキストには、下線も引かれます。
The following example should help to get you started.
例 1PDFlibでPDFドキュメントを作成する
The page contains the text "Times Roman outlined" in an outlined, 30pt font.
以下のスクリプト getpdf.php は、PDFドキュメ ントを返すだけのものです。
The PDFlib distribution contains a more complex example which creates a page with an analog clock.
PDFlibの配布ファイルには、アナログクロックで本格的なページを作成す るより複雑な例が含まれています。ここでは、PDFlibのメモリ内作成機 能を使用しており、このため、テンポラリファイルは不要です。この例 をPHPからPDFlibを使用するように変換すると以下のようになります。 (CLibPDFモジュール) のドキュメント にも同じ例があります。)
The example was converted to PHP from the PDFlib example. (The same example is available in the CLibPDF documentation.)
例 2PDFlib配布ファイル中の pdfclockの例
Please see the ClibPDF section for details.
注意 PDFドキュメントを作成するための別のPHPモジュールとして FastIO's ClibPDFが利用可能です。 詳細については、 ClibPDF の節を参 照下さい。 ClibPDF はPDFlibとはや や異なるAPIを使用していることに注意して下さい。
This extension allows you to process credit cards and other financial transactions using Verisign Payment Services, formerly known as Signio (http: / /www.verisign.com / products / payflow / pro / index.html).
この拡張モジュールにより、以前はSignio( http://www.verisign.com/products/payflow/pro/index.html )として知られていたVerisign Payment Servicesを使用してクレジットカードおよび他の金融トランザク ションを処理することが可能になります。
However the functions are still available in case you are processing a number of transactions and require fine control over the library.
これらの関数を使用する場合、 pfpro_init() および pfpro_cleanup() のコールを省略することが可能です。 これは、この拡張モジュールが必要に応じて時動的にこれらをコールする ためです。しかし、複数のトランザクションを処理し、ライブラリ全体を 意のままに制御したい場合には、これらの関数を利用することが可能です。 これら二つの関数コールの間に、 pfpro_process() を 使用してトランザクションを何回でも行うことが可能です。
These functions were added in PHP 4.0.2.
これらの関数は、PHP 4.0.2で追加されました。
Be sure to read the Payflow Pro Developers Guide for full details of the required parameters.
注意 これらの関数は、Verisign Payment Servicesへのリンクのみ提供します。 必要なパラメータの詳細については、Payflow Pro Developers Guideを 参照下さい。
This extension is not available on Windows platforms.
注意 この拡張モジュールはWindows環境では利用できません。
If you are going to use this extension in an SSL-enabled webserver or with other SSL components (such as the CURL+SSL extension) you MUST get the beta SDK.
使用するプラットフォーム用の適当なSDKが必要です。これは、登録後に manager interface からダ ウンロードすることが可能です。この拡張モジュールをSSL対応のWebサー バまたは(CURL+SSL拡張のような)他のSSLコンポーネントで使用する際に は、ベータ版のSDKが必要です。
Copy the header file pfpro.h to / usr / local / include and the library file libpfpro.so to / usr / local / lib.
SDKをダウンロードした後、配布ファイルのディレクトリ lib からファイルをコピーする必要があり ます。ヘッダファイル pfpro.h を /usr/local/include に、 ライブラリファイル libpfpro.so を /usr/local/lib にコピーして 下さい。
The behaviour of these functions is affected by settings in php.ini.
以下の関数は、PHPがオプション --with-pfpro[=DIR] を付けてコンパイルされ ている場合にのみ利用可能です。
Verisign Payflow Pro configuration options
これらの関数の動作は、 php.ini の設定により変化します。
"test.signio.com"
表 1Verisign Payflow Pro 設定オプション
"test-payflow.verisign.com"
この拡張モジュールはリソース型を全く定義し ません。
This extension has no constants defined.
この拡張モジュールは定数を全く定義しませ ん。
PostgreSQL supports many character encoding including multibyte character encoding.
PostgreSQLサポートを使用するには、PostgreSQL 6.5以降が必要です。 PostgreSQL 7.0以降ではPostgreSQLモジュールの全ての機能を使用可能 です。PostgreSQLは、マルチバイト文字エンコーディングを含む多くの 文字エンコーディングをサポートしています。現在のバージョン及び PostgreSQLに関するより詳細な情報は、 http://www.postgresql.org/ で入手可能です。
In order to enable PostgreSQL support, --with-pgsql[ =DIR] is required when you compile PHP.
PostgreSQLサポートを利用可能とするには、PHPコンパイル時に --with-pgsql[=DIR] を指定することが必要です。 共有オブジェクトモジュールが利用可能な場合、 php.ini の extension ディレクティブ または dl() 関数によりPostgreSQLモジュール をロードすることが可能です。
If shared object module is available, PostgreSQL module may be loaded using extension directive in php.ini or dl() function.
これらの関数の動作は、 php.ini の設定により変化します。
Table 1.
表 1PostgreSQL設定オプション
Whether to allow persistent Postgres connections.
以下に設定ディレクティブの簡単な説明を示します。
The maximum number of Postgres connections per process, including persistent connections.
持続的なPostgres接続を可能にするかどうか。
Use 4.1.0 or later.
プロセス毎の持続的Postgres接続の最大数。
Most of new names will have additional underscores, e.g. pg_lo_open().
持続的接続を含むプロセス毎のPostgres接続の最大数。
Older names can be used in 4.2.0 and a few releases from 4.2.0, but they may be deleted in the future.
通知メッセージを処理するコードにバグがあるため、PHP 4.0.6で PostgreSQLモジュールを使用することは推奨されません。 4.1.0以降を使用してください。
The old pg_connect() / pg_pconnect() syntax will be deprecated to support asynchronous connections in the future.
PostgreSQLモジュールの関数名は、現在のコーディング標準に準拠する ために 4.2.0以降変更されます。新しい関数名の多くには、 pg_lo_open()のようにアンダースコアが付きます。 いくつかの関数は、pg_exec()からpg_query()というように、統一を とるために関数名が変更されます。 古い名前も4.2.0とそれに続くいくつかのバージョンで使用可能ですが、 将来的には削除される可能性があります。
Not all functions are supported by all builds.
表 2変更された関数名
If there is missing function, libpq does not support the feature required for the function.
従来のpg_connect()/pg_pconnect() 構文は、将来的に非同期接続 機能をサポートするために過去のものとなる可能性があります。 pg_connect() 、 pg_pconnect() では、接続文字列を使用してください。
If you use libpq older than PostgreSQL Server expects, you may have problems.
全ての関数が全ての構築環境でサポートされるわけではありません。サ ポートされる関数は、使用するlibpq(PostgreSQLのCクライアントインター フェイス)のバージョンとlibpqのコンパイル方法に依存します。足りな い関数がある場合、libpqはその関数を必要とする機能をサポートしませ ん。
This option can be enabled with the '-i' flag to postmaster and it's meaning is: "listen on TCP / IP sockets as well as Unix domain sockets ".
接続するPostgreSQLサーバーよりも新しいlibpqを使用することも重要で す。使用するlibpqのバージョンがPostgreSQLサーバが期待するよりも古 い場合、問題を生じる可能性があります。
Is the postmaster running and accepting TCP / IP (with -i) connection at'localhost 'on port '5432'? in / path / to / file.php on line 20.
バージョン6.3(1998/3/2)以降、PostgreSQLはUNIXドメインソケットを 使用しています。これらの新しいコネクションの使用例を以下に示す表に 示します。このソケットは /tmp/.s.PGSQL.5432 に あります。このオプションは postmaster に対して'- i'フラグを指定することで有効となります。これは "Unixドメインソケッ ト以外のTCP/IPソケットもlisten する"という意味です。
pg_connect( "host=localhost dbname=MyDbName");
表 3postmasterとPHP
The previous syntax of: $conn = pg_connect ("host", "port", "options", "tty", "dbname") has been deprecated.
PostgreSQL サーバへの接続は、以下のようにコマンド文字列の中に 値の組を羅列することにより、確立することができます。 $conn = pg_Connect("host=myHost port=myPort tty=myTTY options=myOptions dbname=myDB user=myUser password=myPassword");
For example, PostgreSQL module will lookup PGHOST environment variable when the hostname is omitted in the connection string.
以前の構文: $conn = pg_connect ("host", "port", "options", "tty", "dbname") は古い構文であり、推奨されません。
Refer to PostgreSQL Programmer' s Manual (libpq - Environment Variables) for details.
環境変数は、PostgreSQLサーバ/クライアントの動作に影響を与えます。 例えば、PostgreSQLモジュールは、ホスト名が接続文字列で省略された場 合、環境変数PGHOSTを探します。サポートされる環境変数は、バージョン 毎に異なります。詳細は、PostgreSQLプログラマ用マニュアル(libpq - 環境変数)を参照下さい。
Use $_ENV or getenv() to check which environment variables are available to the current process.
適切なユーザ用に環境変数が設定されていることを確認して下さい。 カレントのプロセスで利用可能な環境変数を確認するには、 $_ENV または getenv() を使用して下さい。
Setting default parameters
例 1デフォルトのパラメータを設定する
The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
これらの定数は、この拡張モジュールで定義されており、 この拡張モジュールがPHP内部にコンパイルされているか実行時に動的にロー ドされるかのどちらかの場合のみ使用可能です。
In older versions, this was limited to the block size (default was 8KB, maximum was 32KB, defined at compile time)
PostgreSQL 7.1.0から、textデータ型の最大サイズは1GBとなっています。 古いPostgreSQLのtextデータ型はブロックサイズ(デフォルトは8KB、最大 32KBをコンパイル時に定義可能)の制限を受けていました。
A transaction block starts with a SQL statement BEGIN and if the transaction was valid ends with COMMIT or END.
ラージオブジェクト(lo)インターフェースを使用するには、そのクエリーを トランザクション・ブロックの中に入れてやる必要があります。 トランザクション・ブロックは BEGIN で始まり、 そのトランザクションが有効な場合は COMMIT または END で終わります。トランザクションが失敗した場合、 そのトランザクションは ROLLBACK または ABORT により閉じる必要があります。
Example 2.
例 2ラージオブジェクトの使用例
Some more system specific functions have not been available before, though, and this module tries to remedy this by providing easy access to these functions.
posix_getpwnam() のようなPOSIX関数で重要なデー タを取得することができます。 safe mode が有効な場合に、 POSIX関数のどれもアクセスチェックを行うことはできません。 このため、このような環境で処理を行うには、 (configureにおいて --disable-posix を指定して) POSIX拡張モジュールを無効にしておくことを 強く 推奨します。
Sensitive data can be retrieved with the POSIX functions, e.g. posix_getpwnam() and friends.
注意 この拡張モジュールはWindows環境では利用できません。
It' s therefore strongly advised to disable the POSIX extension at all (use --disable-posix in your configure line) if you're operating in such an environment.
POSIX関数は、デフォルトで有効となっています。POSIX互換関数を --disable-posix により無効にするこ とができます。
The section about Process Control Functions maybe of interest for you.
プロセス制御関数 に関する節も役に 立つでしょう。
They have been added in PHP 4.0.4.
以下の関数は、Windows 9.x, ME, NT4, 2000でのみ利用可能です。これらの 関数は、PHP 4.0.4で追加されました。
The behaviour of these functions is affected by settings in php.ini.
php.ini ファイルに extension=php_printer.dll の 行を追加して下さい。
Printer configuration options
これらの関数の動作は、 php.ini の設定により変化します。
printer.default_printer
表 1プリンタ設定オプション
These functions allow you to check the spelling of a word and offer suggestions.
これらの関数により、単語のスペルチェックを行い、修正案を提案させる ことが可能となります。
This extension is not available on Windows platforms.
注意 この拡張モジュールはWindows環境では利用できません。
To compile PHP with pspell support, you need the aspell and pspell libraries, available from http: / /aspell.sourceforge.net / and http: / /aspell.net / respectively.
aspellライブラリおよびpspellライブラリが必要です。これらは、それぞ れ http://aspell.sourceforge.net/ および http://aspell.net/ で取得可能です。
If you have the libraries needed add the --with-pspell[ =dir] option when compiling PHP.
PHPをコンパイルする際にオプション --with-pspell[=dir] を追加する必 要があります。
This extension has no configuration directives defined in php.ini.
この拡張モジュールは設定ディレクティブを全く 定義しません。
This extension has no resource types defined.
この拡張モジュールはリソース型を全く定義し ません。
Prev
これらの定数は、この拡張モジュールで定義されており、 この拡張モジュールがPHP内部にコンパイルされているか実行時に動的にロー ドされるかのどちらかの場合のみ使用可能です。
The behaviour of this extension - - including the names of its functions and anything else documented about this extension - - may change without notice in a future release of PHP.
このモジュールは、 実験的 なものです。これは、これらの関数の動作、関数名は、このドキュメントに書かれて事項と同様に告知なく将来的なPHPのリリースで変更される可能性があります。注意を喚起するとともに、このモジュールは使用者のリスクで使用して下さい。
Note:
注意 この拡張モジュールはWindows環境では利用できません。
You need the Qt-library =2.2.0
Qtライブラリ =2.2.0 が必要です。
Prev
以下の関数を使用するには、PHP --with-qtdom をconfigureに指定します。
These are functions that provide editable command lines.
注意 この拡張モジュールはWindows環境では利用できません。
Because of the interactive nature of this library, it will be of little use for writing Web applications, but may be useful when writing scripts meant using PHP from the command line.
readline関数を使用するには、libreadlineをインストールすることが必 要です。librealineは、 http://cnswww.cns.cwru.edu/~chet/readline/rltop.html にあるGNU Readlineプロ ジェクトのホームページから入手可能です。このライブラリは、Bash の 作者でもある Chet Ramey により管理されています。
You can find libreadline on the home page of the GNU Readline project, at http: / /cnswww.cns.cwru.edu / ~chet / readline / rltop.html.
この関数を非GPLのreadlineライブラリの代替品であるlibeditライブラ リで使用することも可能です。libeditライブラリは、BSDライセンスで 配布され、 http://sourceforge.net/projects/libedit/ から入 手可能です。
The libedit library is BSD licensend and available for download from http: / /sourceforge.net / projects / libedit /.
この関数を使用するには、readlineサポートを有効にしてCGIまたはCLI版の PHPをコンパイルする必要があります。PHPのconfigureに --with-readline[=DIR] を指定する必 要があります。readlineの代替品であるlibeditを使用したい場合、PHPの configureに --with-libedit[=DIR] を 指定して下さい。
You need to configure PHP --with-readline[ =DIR].
この拡張モジュールは設定ディレクティブを全く 定義しません。
This extension has no configuration directives defined in php.ini.
この拡張モジュールはリソース型を全く定義し ません。
This extension has no constants defined.
この拡張モジュールは定数を全く定義しませ ん。
When this cannot be achieved exactly, it may get rid of the offending characters or fall back on approximations.
このモジュールは、GNU recodeライブラリバージョン 3.5 へのインター フェースを有しています。GNU Recode ライブラリは、様々にコード化さ れた文字や表面的なエンコード法を相互に変換します。 正確に変換できない場合、問題のある文字を削除するか近似を行います。 このライブラリは、約150種類の文字セットを認識、生成することが可能で、 ほとんど全ての組み合わせで相互の変換を行うことができます。 RFC 1345 文字セットのほ とんどがサポートされています。
Most RFC 1345 character sets are supported.
注意 この拡張モジュールはWindows環境では利用できません。
To be able to use the functions defined in this module you must compile your PHP interpreter using the --with-recode[ =DIR] option.
GNU Recode 3.5以降をシステムにインストールしておく必要があります。 このパッケージは、 ここ からダウ ンロードすることが可能です。