« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 386 for contents (0.002 sec.)
出力用バッファの内容を返す 7442
« ob_get_clean ob_get_flush » PHP Manual 出力制御 関数 出力用バッファの内容を返す 検索 ob_get_contents (PHP 4, PHP 5, PHP 7, PHP 8) ob_get_contents — 出力用バッファの内容を返す 説明 function ob_get_contents (): string | false 出力用バッファ ... り値 出力用バッファの内容を返します。 出力のバッファリングがアクティブでない場合には false を返します。 例 例1 単純な ob_get_contents() の例 <?php ob_start (); echo "Hello " ; $out1 = ob_get_contents (); echo "World" ; $out2 = ob_get_contents (); ob_end_cl ... ld" 参考 ob_start() - 出力のバッファリングを有効にする ob_get_length() - 出力バッファの長さを返す 関連キーワード: バッファ contents Hello リング start World flush 制御 クリア dump 参考 length ...
https://man.mtool.work/php/8.3/function.ob-get-contents.html
ファイルの内容を全て文字列に読み込む 7390
« file_exists file_put_contents » PHP Manual ファイルシステム 関数 ファイルの内容を全て文字列に読み込む 検索 file_get_contents (PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8) file_get_contents — ファイルの内容を全て文字列に読み込む 説明 function file ... _get_contents ( string $filename , bool $use_include_path = false , ? resource $context = null , int $offset = 0 , ? int $length = null ... で指定した場所から開始し length バイト分だけ ファイルの内容を文字列に読み込むという点が異なります。 失敗した場合、 file_get_contents() は false を返します。 file_get_contents() はファイルの内容を文字列に読み込む 方法として好ましいものです。もしOSがサポート ... さい場合、あるいはストリーム内での指定した offset へのシークが失敗した場合に E_WARNING レベルのエラーが発生します。 file_get_contents() 関数がディレクトリに対して呼び出されると、 Windows では E_WARNING レベルのエラーが発生していました。 PHP 7.4 以降では、W ...
https://man.mtool.work/php/8.3/function.file-get-contents.html
出力用バッファの内容を返す 7390
« ob_get_clean ob_get_flush » PHP Manual 出力制御 関数 出力用バッファの内容を返す 検索 ob_get_contents (PHP 4, PHP 5, PHP 7, PHP 8) ob_get_contents — 出力用バッファの内容を返す 説明 function ob_get_contents (): string | false 出力用バッファ ... り値 出力用バッファの内容を返します。 出力のバッファリングがアクティブでない場合には false を返します。 例 例1 単純な ob_get_contents() の例 <?php ob_start (); echo "Hello " ; $out1 = ob_get_contents (); echo "World" ; $out2 = ob_get_contents (); ob_end_cl ... 考 ob_start() - 出力のバッファリングを有効にする ob_get_length() - 出力バッファの長さを返す 関連キーワード: ob バッファ get contents out string Hello false パラメータ リング start echo World Search flush 制御 function クリア 戻り値 場合 ...
https://man.mtool.work/php/8.3/function.ob-get-contents.html
ファイルの内容を全て文字列に読み込む 7390
« file_exists file_put_contents » PHP Manual ファイルシステム 関数 ファイルの内容を全て文字列に読み込む 検索 file_get_contents (PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8) file_get_contents — ファイルの内容を全て文字列に読み込む 説明 function file ... _get_contents ( string $filename , bool $use_include_path = false , ? resource $context = null , int $offset = 0 , ? int $length = null ... で指定した場所から開始し length バイト分だけ ファイルの内容を文字列に読み込むという点が異なります。 失敗した場合、 file_get_contents() は false を返します。 file_get_contents() はファイルの内容を文字列に読み込む 方法として好ましいものです。もしOSがサポート ... さい場合、あるいはストリーム内での指定した offset へのシークが失敗した場合に E_WARNING レベルのエラーが発生します。 file_get_contents() 関数がディレクトリに対して呼び出されると、 Windows では E_WARNING レベルのエラーが発生していました。 PHP 7.4 以降では、W ...
https://man.mtool.work/php/8.3/function.file-get-contents.html
残りのストリームを文字列に読み込む 7242
« stream_filter_remove stream_get_filters » PHP Manual ストリーム 関数 残りのストリームを文字列に読み込む 検索 stream_get_contents (PHP 5, PHP 7, PHP 8) stream_get_contents — 残りのストリームを文字列に読み込む 説明 function stream_get_contents ... nts ( resource $stream , ? int $length = null , int $offset = -1 ): string | false file_get_contents() と似ていますが、 stream_get_contents() は既にオープンしている ストリームリソースに対して操作を行います。そして、指定した ... ます。失敗した場合に false を返します。 変更履歴 バージョン 説明 8.0.0 length は、nullable になりました。 例 例1 stream_get_contents() の例 <?php if ( $stream = fopen ( 'http://www.example.com' , 'r' )) { // オフセット 10 から開始して、残りのすべてのページ ... を表示します echo stream_get_contents ( $stream , - 1 , 10 ); fclose ( $stream ); } if ( $stream = fopen ( 'http://www.example.net' , 'r' )) { // 最初の 5 バイト ...
https://man.mtool.work/php/8.3/function.stream-get-contents.html
残りのストリームを文字列に読み込む 7242
« stream_filter_remove stream_get_filters » PHP Manual ストリーム 関数 残りのストリームを文字列に読み込む 検索 stream_get_contents (PHP 5, PHP 7, PHP 8) stream_get_contents — 残りのストリームを文字列に読み込む 説明 function stream_get_contents ... nts ( resource $stream , ? int $length = null , int $offset = -1 ): string | false file_get_contents() と似ていますが、 stream_get_contents() は既にオープンしている ストリームリソースに対して操作を行います。そして、指定した ... ます。失敗した場合に false を返します。 変更履歴 バージョン 説明 8.0.0 length は、nullable になりました。 例 例1 stream_get_contents() の例 <?php if ( $stream = fopen ( 'http://www.example.com' , 'r' )) { // オフセット 10 から開始して、残りのすべてのページ ... を表示します echo stream_get_contents ( $stream , - 1 , 10 ); fclose ( $stream ); } if ( $stream = fopen ( 'http://www.example.net' , 'r' )) { // 最初の 5 バイト ...
https://man.mtool.work/php/8.3/function.stream-get-contents.html
名前を使用して、エントリのファイルハンドラ (読み込み専用) を取得する 6929
« ZipArchive::getStatusString ZipArchive::getStreamIndex » PHP Manual ZipArchive 名前を使用して、エントリのファイルハンドラ (読み込み専用) を取得する 検索 ZipArchive::getStream (PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL zip >= 1.1.0) ZipArchive::g ... イルポインタ (リソース)、 失敗した場合に false を返します。 例 例1 エントリの内容を fread() で取得し、それを保存する <?php $contents = '' ; $z = new ZipArchive (); if ( $z -> open ( 'test.zip' )) { $fp = $z -> getStream ( 'test' ); if(! $fp ) exit( "失敗\ ... n" ); while (! feof ( $fp )) { $contents .= fread ( $fp , 2 ); } fclose ( $fp ); file_put_contents ( 't' , $contents ); echo "終了\n" ; } ?> 例2 先ほどの例と同じこ ... とを、 fopen() および zip ストリームラッパーで行う <?php $contents = '' ; $fp = fopen ( 'zip://' . dirname ( __FILE__ ) . '/test.zip#test' , 'r' ); if (! $fp ) { exit( "オープンできません\n ...
https://man.mtool.work/php/8.3/ziparchive.getstream.html
名前を使用して、エントリのファイルハンドラ (読み込み専用) を取得する 6877
« ZipArchive::getStatusString ZipArchive::getStreamIndex » PHP Manual ZipArchive 名前を使用して、エントリのファイルハンドラ (読み込み専用) を取得する 検索 ZipArchive::getStream (PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL zip >= 1.1.0) ZipArchive::g ... イルポインタ (リソース)、 失敗した場合に false を返します。 例 例1 エントリの内容を fread() で取得し、それを保存する <?php $contents = '' ; $z = new ZipArchive (); if ( $z -> open ( 'test.zip' )) { $fp = $z -> getStream ( 'test' ); if(! $fp ) exit( "失敗\ ... n" ); while (! feof ( $fp )) { $contents .= fread ( $fp , 2 ); } fclose ( $fp ); file_put_contents ( 't' , $contents ); echo "終了\n" ; } ?> 例2 先ほどの例と同じこ ... とを、 fopen() および zip ストリームラッパーで行う <?php $contents = '' ; $fp = fopen ( 'zip://' . dirname ( __FILE__ ) . '/test.zip#test' , 'r' ); if (! $fp ) { exit( "オープンできません\n ...
https://man.mtool.work/php/8.3/ziparchive.getstream.html
データをファイルに書き込む 6669
« file_get_contents fileatime » PHP Manual ファイルシステム 関数 データをファイルに書き込む 検索 file_put_contents (PHP 5, PHP 7, PHP 8) file_put_contents — データをファイルに書き込む 説明 function file_put_contents ( string $filename , mix ... す。 これは、 stream_copy_to_stream() の挙動と似ています。 data に一次元の配列を指定することもできます。この場合は file_put_contents($filename, implode('', $array)) と同じ意味になります。 flags flags の値は、以下のフラグを組み合わせたものとなります 組み合 ... 例1 シンプルな使用例 <?php $file = 'people.txt' ; // ファイルをオープンして既存のコンテンツを取得します $current = file_get_contents ( $file ); // 新しい人物をファイルに追加します $current .= "John Smith\n" ; // 結果をファイルに書き出します file_put_conte ... ラグはファイルの最後に追記することを表し、 // LOCK_EX フラグは他の人が同時にファイルに書き込めないことを表します。 file_put_contents ( $file , $person , FILE_APPEND | LOCK_EX ); ?> 注意 注意 : この関数はバイナリデータに対応しています。 ヒント fopen wrappe ...
https://man.mtool.work/php/8.3/function.file-put-contents.html
This factory method creates a hash from a string 6617
« QuickHashStringIntHash::loadFromFile QuickHashStringIntHash::saveToFile » PHP Manual QuickHashStringIntHash This factory method creates a hash from a string 検索 QuickHashStringIntHash::loadFromString (No version information available, mi ... s factory method creates a hash from a string 説明 public static function QuickHashStringIntHash::loadFromString ( string $contents , int $size = 0 , int $options = 0 ): QuickHashStringIntHash This factory method creates a new hash from a definition in a ... string. The format is the same as the one used in "loadFromFile". パラメータ contents The string containing a serialized format of the hash. size The amount of bucket lists to configure. The number you pass i ... it of 4194304. 戻り値 Returns a new QuickHashStringIntHash. 例 例1 QuickHashStringIntHash::loadFromString() example <?php $contents = file_get_contents ( dirname ( __FILE__ ) . "/simple.hash.string" ); $hash = QuickHashStringIntHash :: loadFromString ( $ ...
https://man.mtool.work/php/8.3/quickhashstringinthash.loadfromstring.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT