By default,stream_filter_append()will attach the filter to theread filter chainif the file was opened for reading (i.e. File Mode:r, and/or+). The filter will also be attached to thewrite filter chainif the file was opened for writing (i.e. File Mode:w,a, and/or+).STREAM_FILTE...
stream_filter_register('addresses','Horde_Kolab_Filter_Helper_AddressFilter');stream_filter_append($world['fp'],'addresses', STREAM_FILTER_READ,array('recipient'=> $world['recipient'],'sender'=> $world['sender']));break;default:return$this->notImplemented($action); } } 开发者ID:jubinpate...
Append a filter to a stream:<?php $f = fopen("test1.txt", "w");// Add "zlib.deflate" filterstream_filter_append($f, "zlib.deflate"); fclose($f);?> Definition and UsageThe stream_filter_append() function appends a filter to a stream....
STREAM_FILTER_READ); // read file data $contents=fread($fp,1024); // file data is first filtered and stored in $contents echo$contents; fclose($fp); ?> On the other hand, if stream_filter_append() is used, then the filter will be applied at the end of the data operation. The ...
$csv->appendStreamFilter('string.rot13'); $csv->prependStreamFilter('string.toupper');$this->assertFalse($csv->getIterator()->getRealPath()); } 开发者ID:arvenil,项目名称:csv,代码行数:7,代码来源:CsvTest.php 注:本文中的League\Csv\Writer::appendStreamFilter方法示例由纯净天空整理自Github/MS...