Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: vfprintf - Manual
[go: Go Back, main page]

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

search for in the

vprintf" width="11" height="7"/> <ucwords
Last updated: Thu, 31 May 2007

view this page in

vfprintf

(PHP 5)

vfprintf — フォーマットされた文字列をストリームに書き込む

説明

int vfprintf ( resource $handle, string $format, array $args )

format によって作成された文字列を handle で指定したストリームに書き込みます。 format については、 sprintf() のドキュメントで説明されています。

fprintf() と同様の動作をしますが、可変引数ではなく 引数の配列を受け取って処理します。

出力された文字列の長さを返します。

printf()sprintf()sscanf()fscanf()vsprintf() および number_format() も参照ください。

例 2430. vfprintf(): 数値のゼロ埋め

<?php
if (!($fp = fopen('date.txt', 'w')))
    return;

vfprintf($fp, "%04d-%02d-%02d", array($year, $month, $day));
// ISO 形式にフォーマットした日付を date.txt に書き込みます
?>



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

vprintf" width="11" height="7"/> <ucwords
Last updated: Thu, 31 May 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites