<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$mem = new Memcache;
$mem->connect("127.0.0.1", 11211);
$re = $mem->set('testkey1','this is first value', 0, 60);
var_export($re);
$val = $mem->get('testkey1');
echo "\r\n";
echo "Get key1 value: " .$val. "\r\n";
上面的是我的代码
我用   php  index.php  能执行脚本并且能得到正确的结果
但是我在浏览器里输入  http://site/index.php  竟然提示 "Class 'Memcache' not found in"我的memcached都装了,而且重启了php和nginx为什么在网页上会出错??  这是为什么??