Login   Register  
PHP Classes
elePHPant
Icontem

File: example

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of roast  >  MEM  >  example  >  Download  
File: example
Role: Example script
Content type: text/plain
Description: example
Class: MEM
Access data in a memcache server like an array
Author: By
Last change:
Date: 6 years ago
Size: 448 bytes
 

Contents

Class file image Download
<?php

include_once('mem.class.php')  ;

$_MEM['dd'] = "roast";
unset(
$_MEM['dd']);               //delete a memcache value
var_dump($_MEM['dd']);            

echo 
$_MEM->_host;  
$_MEM['_host'] = '192.168.1.1';   //set the memcache server host
echo $_MEM->_host;

$_MEM['roast'] = '';  
$memcache = new Memcache;
$memcache->connect('10.210.71.51'11211) or die ("Could not connect");
var_dump($memcache->get('roast'));
?>