Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $apc_key = 'abc';
- if (isset($_GET['clear'])) {
- apc_delete($apc_key);
- header('HTTP/1.1 302 Found');
- header('Location: http://json.daverandom.com/apc.php');
- exit;
- }
- if (!apc_exists($apc_key)) {
- $message = 'New data';
- $apc_data = array(
- 'test'=>'123',
- 'data'=>'test123456');
- apc_store($apc_key, $apc_data);
- } else {
- $message = 'Saved data';
- }
- ?>
- <html>
- <head>
- <title>APC test</title>
- </head>
- <body>
- <?=$message?>
- <pre>
- <?php var_dump(apc_fetch($apc_key)); ?>
- </pre>
- <a href="?clear">Clear It</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment