<?php
namespace Common\Org;
use Think\Cache\Driver\Memcached;
class Mem{
private static $_m = null;
private static $a = 0;
private function __construct(){}
private function __clone(){}
public static function getInstance(){
if (is_null( self::$_m )) {
echo '5';
self::$_m = new Memcached();
}
return self::$_m;
}
}
最佳答案