file_append

This commit is contained in:
udo
2022-01-21 00:06:52 +00:00
parent 5f3ae65b17
commit dd14dbb6e3
7 changed files with 72 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
RENDER()
{
DTree t;
<>
<link rel="stylesheet" href='style.css'></link>
<h1>
<a href="index.uce">UCE Test</a>:
File Append
</h1>
File Append:
<pre style="white-space: pre-wrap"><?
if(context->get["cmd"] == "clear")
file_put_contents("/tmp/test.txt", "");
file_append("/tmp/test.txt", context->server->request_count, "\thello world\t", 2, "\t", time(), "\t", microtime(), "\n");
print(file_get_contents("/tmp/test.txt"));
?></pre>
<button onclick="document.location.href='?cmd=add';">Add Line</button>
<button onclick="document.location.href='?cmd=clear';">Clear File</button>
Params
<pre><?= var_dump(context->params) ?></pre>
</>
}
+1
View File
@@ -25,6 +25,7 @@ RENDER()
<li><a href="memcached.uce">Memcached</a></li>
<li><a href="mysql.uce">MySQL Connector</a></li>
<li><a href="fileio.uce">File I/O</a></li>
<li><a href="file_append.uce">File Append</a></li>
<li><a href="random.uce">RNG/Noise</a></li>
<li><a href="task.uce">Task API</a></li>
</ul>