downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

sqlite_unbuffered_query> <sqlite_udf_decode_binary
[edit] Last updated: Fri, 25 May 2012

view this page in

sqlite_udf_encode_binary

(PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)

sqlite_udf_encode_binary UDFから返す前にバイナリデータをエンコードする

説明

string sqlite_udf_encode_binary ( string $data )

sqlite_udf_encode_binary() は (元のlibsqlite APIはバイナリ対応ではないため)、 クエリから安全に値を返せるようにdata にバイ ナリエンコーディングを適用します。

バイナリセーフでないと思われるデータ(例: ヌルバイトを末尾以外の場所 に含むデータや先頭文字に0x01を含むデータ)の場合、 UDFからの返り値をエンコードするために、この関数をコールする必要があ ります。

PHPは、このエンコード/デコード処理を自動的に行いません。 これは、性能上著しい影響があるためです。

注意:

UDFから返す文字列をクオートするために sqlite_escape_string()を使用しないでください。 代わりにこの関数を使用してください。

パラメータ

data

エンコードしたい文字列。

返り値

エンコードされた文字列を返します。

参考



add a note add a note User Contributed Notes sqlite_udf_encode_binary
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites