mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 10:28:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299728 c90b9560-bf6c-de11-be94-00142212c4b1
120 lines
3 KiB
XML
120 lines
3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="function.apc-delete-file" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>apc_delete_file</refname>
|
|
<refpurpose>Deletes files from the opcode cache</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>mixed</type><methodname>apc_delete_file</methodname>
|
|
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Deletes the given files from the opcode cache.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>keys</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The files to be deleted. Accepts a <type>string</type>,
|
|
<type>array</type> of strings, or an <classname>APCIterator</classname>
|
|
<type>object</type>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
Or if <parameter>keys</parameter> is an <type>array</type>, then
|
|
an empty array is returned on success, or an array of failed files
|
|
is returned.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title><function>apc_delete_file</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$filename = 'file.php';
|
|
|
|
if (apc_compile_file($filename)) {
|
|
|
|
if (apc_delete_file($filename)) {
|
|
echo "Successfully deleted file $filename from APC cache.", PHP_EOL;
|
|
}
|
|
}
|
|
|
|
if (apc_compile_file($filename)) {
|
|
|
|
if ($good = apc_delete_file(array($filename, 'donotexist.php'))) {
|
|
var_dump($good);
|
|
}
|
|
}
|
|
|
|
$bad = apc_delete_file('donotexist.php');
|
|
var_dump($bad);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
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]=>
|
|
string(14) "donotexist.php"
|
|
}
|
|
[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)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><function>apc_clear_cache</function></member>
|
|
<member><function>apc_delete</function></member>
|
|
<member><function>apc_exists</function></member>
|
|
</simplelist>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|