<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.streamwrapper.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'streamwrapper.stream-write.php',
    1 => 'streamWrapper::stream_write',
    2 => 'ストリームに書き込む',
  ),
  'up' => 
  array (
    0 => 'class.streamwrapper.php',
    1 => 'streamWrapper',
  ),
  'prev' => 
  array (
    0 => 'streamwrapper.stream-truncate.php',
    1 => 'streamWrapper::stream_truncate',
  ),
  'next' => 
  array (
    0 => 'streamwrapper.unlink.php',
    1 => 'streamWrapper::unlink',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/stream/streamwrapper/stream-write.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="streamwrapper.stream-write" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">streamWrapper::stream_write</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.2, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">streamWrapper::stream_write</span> &mdash; <span class="dc-title">ストリームに書き込む</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-streamwrapper.stream-write-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>streamWrapper::stream_write</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$data</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   このメソッドは、<span class="function"><a href="function.fwrite.php" class="function">fwrite()</a></span> に対応してコールされます。
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    正常にストリームに書き込めたバイト数ぶんだけ、
    ストリームの現在位置を更新することを忘れないようにしましょう。
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-streamwrapper.stream-write-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">data</code></dt>
     <dd>
      <p class="para">
       元となるシステムに書き込まれるデータ。
      </p>
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <p class="para">
        元となるシステム上にすべてを書き込むだけの余地がない場合は、
        可能な限りのデータを格納します。
       </p>
      </p></blockquote>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-streamwrapper.stream-write-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   正常に格納できたバイト数、あるいは何も格納できなかった場合は 0 を返します。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-streamwrapper.stream-write-errors">
  <h3 class="title">エラー / 例外</h3>
  <p class="para">このメソッドのコールに
(未実装などの理由で) 失敗した場合、
<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> を発行します。</p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    戻り値が <code class="parameter">data</code> の長さより大きい場合は、
    <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> が発行されて戻り値がその長さまで切り詰められます。
   </p>
  </p></blockquote>
 </div>

 



 <div class="refsect1 seealso" id="refsect1-streamwrapper.stream-write-seealso">
  <h3 class="title">参考</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.fwrite.php" class="function" rel="rdfs-seeAlso">fwrite()</a> - バイナリセーフなファイル書き込み処理</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>