zc035 发表于 2015-6-12 14:43:39

CI 的 Driver.php 是否存在 BUG。。

本帖最后由 zc035 于 2015-6-12 22:08 编辑

代码:

if ( ! class_exists($class_name, FALSE))
{

   if (class_exists($child_name, FALSE))
   {
      $class_name = $child_name;

   }
   else
{
      $msg = 'Unable to load the requested driver: '.$class_name;
      log_message('error', $msg);
      show_error($msg);
   }
}

每次提示错误 。

例如:
Unable to load the requested driver: Cache_dummy
Unable to load the requested driver: Cache_memcached



ahcheqiu 发表于 2015-6-16 16:52:54

把怎样调用cache的放出来看看

zc035 发表于 2015-6-16 21:06:27

ahcheqiu 发表于 2015-6-16 16:52
把怎样调用cache的放出来看看

$this->load->driver('cache');
$this->cache->memcached->is_supported();
$this->cache->memcached->save('foo', 'bar', 200);

谢谢兄台回复。

ahcheqiu 发表于 2015-6-17 12:29:13

zc035 发表于 2015-6-16 21:06
$this->load->driver('cache');
$this->cache->memcached->is_supported();
$this->cache->memcached->sa ...

你这样写一下看看
$this->load->driver('cache', array('adapter' => 'memcached', 'backup' => 'file'));
页: [1]
查看完整版本: CI 的 Driver.php 是否存在 BUG。。