fix: add list to quicknote and quickupload
This commit is contained in:
parent
abd4773e16
commit
51d27c6f1c
4 changed files with 56 additions and 18 deletions
|
|
@ -5,9 +5,30 @@ $path = __DIR__ . '/../../tmp/quicknotes';
|
|||
if (!file_exists($path)) {
|
||||
mkdir($path);
|
||||
}
|
||||
if (!file_exists($path . '/logs.txt')) {
|
||||
file_put_contents($path . '/logs.txt', '');
|
||||
}
|
||||
|
||||
$path = realpath($path);
|
||||
|
||||
if ($_SERVER['REQUEST_URI'] === '/list') {
|
||||
$msgs = explode("\n", file_get_contents($path . '/logs.txt'));
|
||||
array_pop($msgs);
|
||||
?>
|
||||
<h3>List of messages</h3>
|
||||
<ul>
|
||||
<?php
|
||||
foreach ($msgs as $msg) {
|
||||
?>
|
||||
<li><?= $msg ?></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
|
||||
$message = '';
|
||||
|
||||
if (isset($_GET['m'])) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue