function.apc-delete-file.html
6.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!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 >= 3.1.1)</p><p class="refpurpose"><span class="refname">apc_delete_file</span> — <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"><?php<br />$filename </span><span style="color: #007700">= </span><span style="color: #DD0000">'file.php'</span><span style="color: #007700">;<br /><br />if (</span><span style="color: #0000BB">apc_compile_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">)) {<br /><br /> if (</span><span style="color: #0000BB">apc_delete_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">)) {<br /> echo </span><span style="color: #DD0000">"Successfully deleted file </span><span style="color: #0000BB">$filename</span><span style="color: #DD0000"> from APC cache."</span><span style="color: #007700">, </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /> }<br />}<br /><br />if (</span><span style="color: #0000BB">apc_compile_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">)) {<br /><br /> if (</span><span style="color: #0000BB">$good </span><span style="color: #007700">= </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">, </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">$good</span><span style="color: #007700">);<br /> }<br />}<br /><br /></span><span style="color: #0000BB">$bad </span><span style="color: #007700">= </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">?></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]=>
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)
</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>