【发布时间】:2014-03-28 09:40:38
【问题描述】:
我想在我的应用程序中使用 memcache。我在 php.ini 文件中启用了 php_memcache.dll 并且正常的 memcache 在简单的 PHP 中工作正常。
$memcache = new Memcache;
$memcache->connect('localhost', 11211);
$test = $memcache->get("A");
if(empty($test)){
echo "setting cache";
$memcache->set("A","Cache contents",MEMCACHE_COMPRESSED,50);
}
echo $test;
但是当我试图将错误显示为:
Fatal error: Class 'Application\Controller\Memcache' not found
请帮我解决我的问题。
【问题讨论】:
标签: php namespaces