<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends MY_Controller {

        function __construct()
        {
        parent::__construct();
         $this->load->model('welcome_model');
         $this->load->model('block_model');
        }
    
	public function index()
	{

        $arr = $this->block_model->getline();
        var_dump($arr);
        //$sql = "select  雨花";
        //$sellAry = $this->server_sell->query($sql);
        //var_dump($sellAry);exit;
              //echo phpinfo();exit;
              // $this->mongo_db->insert('test',array('age'=>24,'name'=>'adsfadf'));
               //$aaa = $this->mongo_db->get_where('test',array('age'=>24));
               //var_dump($aaa);
               //$dsn_esf = "mysql://root:idontcare@wdnjesfdbmastervip.house365.com/house";
               
               //$query =  $this->db_esf->get('block', 10, 20)->result();
                //echo 111;exit;
               //$data['product_detail'] = $this->welcome_model->get_data(array('form_name' => 'block','limit'=>5),'esfhousebak');
               $this->load->view('welcome_message',$data);
	}

    	public function index2()
	{

              //echo phpinfo();exit;
              // $this->mongo_db->insert('test',array('age'=>24,'name'=>'adsfadf'));
               //$aaa = $this->mongo_db->get_where('test',array('age'=>24));
               //var_dump($aaa);
               //$dsn_esf = "mysql://root:idontcare@wdnjesfdbmastervip.house365.com/house";
               
               //$query =  $this->db_back1->get('block', 10, 20)->result();
               var_dump(111);
               //$this->load->view('welcome_message');
	}

     /**
 
     * memcache调用
 
     
      public function memcache()
    {
        
       
        $key = 'admin_memcache';
        $cache=$this->mc->get($key);
        if(!$cache)
        {
         $cache=$this->mc->set($key, time(),30);
        }
       

        echo date("Y-m-d H:i:s",$cache);
    }
*/
   public function index3()
    {
     $server_sell	= new Server(NS_SELL,"","ary","gbk");
   }

/* 请用memcache2*/
     public function memcache2()
    {
       
    		// Load library  已把类放置到自己加载
		//$this->load->library('memcached_class');
		
		// Lets try to get the key
		$results = $this->memcached_class->get('test');
		
		// If the key does not exist it could mean the key was never set or expired
		if (!$results) 
		{
			// Modify this Query to your liking!
			
			
			// Lets store the results
			$this->memcached_class->add('test', time(),5);
			
			// Output a basic msg
			echo "Alright! Stored some results from the Query... Refresh Your Browser";
		}
		else 
		{
			// Output
			var_dump(date("Y-m-d H:i:s",$results));
			
			// Now let us delete the key for demonstration sake!
			//$this->memcached_class->delete('test');
		}
         }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */