« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 45 for filesize (0.002 sec.)
stream_notification_callback — notification コンテキストパラメータ用のコールバ... 14975
stream_notification_callback (PHP 5 >= 5.2.0, PHP 7, PHP 8) stream_notification_callback — notification コンテキストパラメータ用のコールバック関数 説明 function stream_notification_callback ( int $notification_code , int $severity , ? strin ... message ; break; case STREAM_NOTIFY_CONNECT : echo "Connected..." ; break; case STREAM_NOTIFY_FILE_SIZE_IS : echo "Got the filesize: " , $bytes_max ; break; case STREAM_NOTIFY_MIME_TYPE_IS : echo "Found the mime-type: " , $message ; break; case STREAM_NO ... ected... Found the mime-type: text/html; charset=utf-8 Being redirected to: http://no.php.net/contact Connected... Got the filesize: 0 Found the mime-type: text/html; charset=utf-8 Being redirected to: http://no.php.net/contact.php Connected... Got the f ... ication_callback ( $notification_code , $severity , $message , $message_code , $bytes_transferred , $bytes_max ) { static $filesize = null ; switch( $notification_code ) { case STREAM_NOTIFY_RESOLVE : case STREAM_NOTIFY_AUTH_REQUIRED : case STREAM_NOTIFY ...
https://man.mtool.work/php/8.3/function.stream-notification-callback.html
filesize — ファイルのサイズを取得する | PHP 8.3 12326
filesize (PHP 4, PHP 5, PHP 7, PHP 8) filesize — ファイルのサイズを取得する 説明 function filesize ( string $filename ): int | false 指定したファイルのサイズを取得します。 パラメータ filename ファイルへのパス。 戻り値 ファイルのサイズを返し ... り大きなファイルについては期待とは違う値を返すものがあります。 エラー / 例外 失敗したときは E_WARNING が発生します。 例 例1 filesize() の例 <?php // 出力例 somefile.txt: 1024 bytes $filename = 'somefile.txt' ; echo $filename . ': ' . filesize ( $filename ...
https://man.mtool.work/php/8.3/function.filesize.html
zip_entry_filesize — ディレクトリエントリの実際のファイルサイズを取得する | PHP... 10151
zip_entry_filesize (PHP 4 >= 4.1.0, PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL zip >= 1.0.0) zip_entry_filesize — ディレクトリエントリの実際のファイルサイズを取得する 警告 この関数は PHP 8.0.0 で 非推奨 になります。この関数に頼らないことを強く推奨し ... ます。 説明 #[ \Deprecated ( since : '8.0' , message : 'use ZipArchive::statIndex() instead' , )] function zip_entry_filesize ( resource $zip_entry ): int | false ディレクトリエントリの実際のファイルサイズを返します。 パラメータ zip_entry zip_read( ...
https://man.mtool.work/php/8.3/function.zip-entry-filesize.html
WinCache 関数への切り替え | PHP 8.3 8942
WinCache 関数への切り替え 注意: wincache.rerouteini は WinCache 1.3.7.0 で削除されました。かわりに、自動的な関数置き換え機能を利用します。 wincache.reroute_enabled を参照ください。 WinCache の関数切り替え機能 (WinCache 1.2.0 以降で使用可能で ... 実装が用意されている関数は、次のとおりです。 file_exists file_get_contents readfile is_readable is_writable is_dir realpath filesize WinCache の関数切り替え機能を使えるよう設定するには、WinCache のインストールパッケージに含まれている reroute.ini ファイルを ... e_is_writable is_writeable=wincache_is_writable is_file=wincache_is_file is_dir=wincache_is_dir realpath=wincache_realpath filesize=wincache_filesize 他のマニュアルの関連ページ Linux JM realpath(1) Linux JM realpath(3) Django performance ...
https://man.mtool.work/php/8.3/wincache.reroutes.html
例 | PHP 8.3 8942
例 例1 Zip アーカイブの作成 <?php $zip = new ZipArchive (); $filename = "./test112.zip" ; if ( $zip -> open ( $filename , ZipArchive :: CREATE )!== TRUE ) { exit( "cannot open < $filename >\n" ); } $zip -> addFromString ( "testfilephp.txt" ... f ( $zip ) { while ( $zip_entry = zip_read ( $zip )) { echo "Name: " . zip_entry_name ( $zip_entry ) . "\n" ; echo "Actual Filesize: " . zip_entry_filesize ( $zip_entry ) . "\n" ; echo "Compressed Size: " . zip_entry_compressedsize ( $zip_entry ) . "\n" ... f ( zip_entry_open ( $zip , $zip_entry , "r" )) { echo "File Contents:\n" ; $buf = zip_entry_read ( $zip_entry , zip_entry_filesize ( $zip_entry )); echo " $buf \n" ; zip_entry_close ( $zip_entry ); } echo "\n" ; } zip_close ( $zip ); } ?> 他のマニュアル ...
https://man.mtool.work/php/8.3/zip.examples.html
ftruncate — ファイルを指定した長さに丸める | PHP 8.3 8819
ftruncate (PHP 4, PHP 5, PHP 7, PHP 8) ftruncate — ファイルを指定した長さに丸める 説明 function ftruncate ( resource $stream , int $size ): bool ファイルポインタ stream を引数とし、 ファイルを指定した長さ、サイズに丸めます。 パラメータ stre ... イルの丸めの例 <?php $filename = 'lorem_ipsum.txt' ; $handle = fopen ( $filename , 'r+' ); ftruncate ( $handle , rand ( 1 , filesize ( $filename ))); rewind ( $handle ); echo fread ( $handle , filesize ( $filename )); fclose ( $handle ); ?> 注意 注意 : フ ...
https://man.mtool.work/php/8.3/function.ftruncate.html
posix_getrlimit — システムリソース制限に関する情報を返す | PHP 8.3 8819
posix_getrlimit (PHP 4, PHP 5, PHP 7, PHP 8) posix_getrlimit — システムリソース制限に関する情報を返す 説明 function posix_getrlimit ( ? int $resource = null ): array | false posix_getrlimit() は、 現在のリソースにおけるソフトリミットおよびハ ... で作成できるプロセスの最大数。 memlock RAM 内にロックできるメモリの最大バイト数。 cpu そのプロセスが使用できる CPU 時間。 filesize そのプロセスが使用できるデータセグメントの最大サイズを表すバイト数。 openfiles オープンできるファイルディスクリプタの最大値 ... => unlimited [soft memlock] => unlimited [hard memlock] => unlimited [soft cpu] => unlimited [hard cpu] => unlimited [soft filesize] => unlimited [hard filesize] => unlimited [soft openfiles] => 1024 [hard openfiles] => 1024 ) 参考 man ページ GETRLIMIT(2 ...
https://man.mtool.work/php/8.3/function.posix-getrlimit.html
圧縮フィルタ | PHP 8.3 8100
圧縮フィルタ 圧縮ストリーム を用いれば ローカルファイルシステム上に gzip や bz2 と互換性のある圧縮ファイルを 作成することができます。しかし、これはネットワーク越しの圧縮機能を 持っておらず、また非圧縮ストリームを圧縮されたストリームに変換す ... ' , STREAM_FILTER_WRITE , $params ); fwrite ( $fp , $original_text ); fclose ( $fp ); echo "圧縮後のファイルの大きさは " . filesize ( 'test.deflated' ) . " バイトです。\n" ; echo "もとのテキストは:\n" ; /* readfile と zlib.inflate を利用し、メモリ上で展開 ... eflate' , STREAM_FILTER_WRITE , 6 ); fwrite ( $fp , $original_text ); fclose ( $fp ); echo "圧縮後のファイルの大きさは " . filesize ( 'test.deflated' ) . " バイトです。\n" ; /* 生成される出力: もとのテキストの長さは 70 文字です。 圧縮後のファイルの大きさ ... bzip2.compress と bzip2.decompress <?php $param = array( 'blocks' => 9 , 'work' => 0 ); echo "もとのファイルの大きさは " . filesize ( 'LICENSE' ) . " バイトです。\n" ; $fp = fopen ( 'LICENSE.compressed' , 'w' ); stream_filter_append ( $fp , 'bzip2.compre ...
https://man.mtool.work/php/8.3/filters.compression.html
request_parse_body — リクエストボディを読み取り、解析して結果を返す | PHP 8.3 8100
request_parse_body (PHP 8 >= 8.4.0) request_parse_body — リクエストボディを読み取り、解析して結果を返す 説明 function request_parse_body ( ? array $options = null ): array この関数は リクエストボディを読み取り、 Content-Type ヘッダーに基づき ... グローバル php.ini の設定を上書きします。 max_file_uploads max_input_vars max_multipart_body_parts post_max_size upload_max_filesize 戻り値 request_parse_body() は、 $_POST に相当するものを インデックス 0 に、 $_FILES に相当するものを 1 に 持つ配列ペアを返 ... s form, we allow a bigger upload size. [ $_POST , $_FILES ] = request_parse_body ([ 'post_max_size' => '10M' , 'upload_max_filesize' => '10M' , ]); // Do something with the uploaded files. ?> 他のマニュアルの関連ページ FastAPI Request Files Django reques ...
https://man.mtool.work/php/8.3/function.request-parse-body.html
例 | PHP 8.3 7855
例 rar:// ラッパー の例も参照ください。 例1 オンザフライでの復元 <?php if (! array_key_exists ( "i" , $_GET ) || ! is_numeric ( $_GET [ "i" ])) die( "Index unspecified or non-numeric" ); $index = (int) $_GET [ "i" ]; $arch = RarArchive :: o ... s ( $index , $entries )) die( "No such index: $index " ); $orfilename = $entries [ $index ]-> getName (); //UTF-8 encoded $filesize = $entries [ $index ]-> getUnpackedSize (); /* you could check HTTP_IF_MODIFIED_SINCE here and compare with * $entries[$in ... am" ; header ( "Content-Type: $contentType " ); header ( "Content-Transfer-Encoding: binary" ); header ( "Content-Length: $filesize " ); if ( $_SERVER [ 'REQUEST_METHOD' ] == "HEAD" ) die(); while (! feof ( $fp )) { $s = @ fread ( $fp , 8192 ); if ( $s = ...
https://man.mtool.work/php/8.3/rar.examples.html
PREV 1 2 3 4 5 NEXT