<?php $mem = new Memcache; $mem->connect(‘127.0.0.1‘, 11211) or die ("Could not connect"); $mem->set(‘key‘, ‘This is a test!‘, 0, 60); $val = $mem->get(‘key‘); echo $val; ?>
时间: 2024-10-02 03:52:33
<?php $mem = new Memcache; $mem->connect(‘127.0.0.1‘, 11211) or die ("Could not connect"); $mem->set(‘key‘, ‘This is a test!‘, 0, 60); $val = $mem->get(‘key‘); echo $val; ?>