cookies
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
RENDER()
|
||||
{
|
||||
|
||||
<>
|
||||
<link rel="stylesheet" href='style.css'></link>
|
||||
<h1>
|
||||
<a href="index.uce">UCE Test</a>:
|
||||
Cookies
|
||||
</h1>
|
||||
<pre><?
|
||||
|
||||
echo(var_dump(context->cookies));
|
||||
|
||||
?></pre>
|
||||
<pre><?
|
||||
|
||||
set_cookie("test-cookie-1", "test-value-1", time() + 30*60);
|
||||
set_cookie("test-cookie-2", "test-value-2", time() + 30*60*24);
|
||||
echo(var_dump(context->set_cookies));
|
||||
|
||||
?></pre>
|
||||
<pre><?= var_dump(context->params) ?></pre>
|
||||
</>
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
void test_output()
|
||||
{
|
||||
echo("hello from include!");
|
||||
}
|
||||
+4
-2
@@ -3,7 +3,7 @@
|
||||
RENDER()
|
||||
{
|
||||
|
||||
<html>
|
||||
<>
|
||||
<link rel="stylesheet" href='style.css'></link>
|
||||
<h1>
|
||||
<a href="index.uce">UCE Test</a>:
|
||||
@@ -14,8 +14,10 @@ RENDER()
|
||||
<li><a href="post.uce">Form Post</a></li>
|
||||
<li><a href="post-multipart.uce">Form Multipart Post</a></li>
|
||||
<li><a href="working-dir.uce">Working Directory</a></li>
|
||||
<li><a href="uri.uce">URI</a></li>
|
||||
<li><a href="cookie.uce">Cookies</a></li>
|
||||
</ul>
|
||||
<pre><?= var_dump(context->params) ?></pre>
|
||||
</html>
|
||||
</>
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
|
||||
RENDER()
|
||||
{
|
||||
|
||||
<>
|
||||
<link rel="stylesheet" href='style.css'></link>
|
||||
<h1>
|
||||
<a href="index.uce">UCE Test</a>:
|
||||
URI
|
||||
</h1>
|
||||
<form action="?" method="post">
|
||||
<div>
|
||||
<label>uri_encode</label>
|
||||
<input type="text" name="uri_encode" value="<?= context->post["uri_encode"] ?>"/>
|
||||
<br/>
|
||||
Encode: <?= uri_encode(context->post["uri_encode"]) ?>
|
||||
<br/>
|
||||
Decode: <?= uri_decode(uri_encode(context->post["uri_encode"])) ?>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="Submit Form"/>
|
||||
</div>
|
||||
</form>
|
||||
<pre><?= var_dump(context->params) ?></pre>
|
||||
</>
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user