function.apc-delete-file.html 6.76 KB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Deletes files from the opcode cache</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.apc-define-constants.html">apc_define_constants</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.apc-delete.html">apc_delete</a></div>
 <div class="up"><a href="ref.apc.html">APC Funktionen</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.apc-delete-file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">apc_delete_file</h1>
  <p class="verinfo">(PECL apc &gt;= 3.1.1)</p><p class="refpurpose"><span class="refname">apc_delete_file</span> &mdash; <span class="dc-title">Deletes files from the opcode cache</span></p>

 </div>
esdf


  <p class="para rdfs-comment">
   Deletes the given files from the opcode cache.
  </p>
 </div>


 <div class="refsecsdft1 parameters" id="refsect1-function.apc-delete-file-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>

   
    <dt>
<code class="parameter">keys</code></dt>

    <dd>

     <p class="para">
      The files to be deleted. Accepts a <span class="type"><a href="language.types.string.html" class="type string">string</a></span>,
      <span class="type"><a href="language.types.array.html" class="type array">array</a></span> of strings, or an <a href="class.apciterator.html" class="classname">APCIterator</a>
      <span class="type"><a href="language.types.object.html" class="type object">object</a></span>.
     </p>
    </dd>

   
  </dl>

 </div>

 <div class="refsect1 description" id="refsect1-function.apc-delete-file-description">
  <h3 class="title">Besffchreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><strong>apc_delete_file</strong></span>
   ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$keys</code></span>
   )</div>


 <div class="refsect1 examples" id="refsect1-function.apc-delete-file-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="example-367">
   <p><strong>Beispiel #1 <span class="function"><strong>apc_delete_file()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'file.php'</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">apc_compile_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">))&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">apc_delete_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Successfully&nbsp;deleted&nbsp;file&nbsp;</span><span style="color: #0000BB">$filename</span><span style="color: #DD0000">&nbsp;from&nbsp;APC&nbsp;cache."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />if&nbsp;(</span><span style="color: #0000BB">apc_compile_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">))&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$good&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">apc_delete_file</span><span style="color: #007700">(array(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'donotexist.php'</span><span style="color: #007700">)))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$good</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">$bad&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">apc_delete_file</span><span style="color: #007700">(</span><span style="color: #DD0000">'donotexist.php'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$bad</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

   <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:</p></div>
   <div class="example-contents screen">
<div class="cdata"><pre>
Successfully deleted file file.php from APC cache.
[Mon May 24 09:30:33 2010] [apc-warning] Could not stat file donotexist.php, unable to delete from cache. in /tmp/test.php on line 13.
array(1) {
  [0]=&gt;
  string(14) &quot;donotexist.php&quot;
}
[Mon May 24 09:30:33 2010] [apc-warning] Could not stat file donotexist.php, unable to delete from cache. in /tmp/test.php on line 18.
bool(false)
</pre></div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.apc-delete-file-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="function.apc-clear-cache.html" class="function" rel="rdfs-seeAlso">apc_clear_cache()</a> - Clears the APC cache</span></li>
   <li class="member"><span class="function"><a href="function.apc-delete.html" class="function" rel="rdfs-seeAlso">apc_delete()</a> - Removes a stored variable from the cache</span></li>
   <li class="member"><span class="function"><a href="function.apc-exists.html" class="function" rel="rdfs-seeAlso">apc_exists()</a> - Checks if APC key exists</span></li>
  </ul>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.apc-define-constants.html">apc_define_constants</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.apc-delete.html">apc_delete</a></div>
 <div class="up"><a href="ref.apc.html">APC Funktionen</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>