if ( ! $cfg_val = $this->cache->get( 'cfgload_'.$config_name.'_'.$return_field ) ) { // no cache, หาค่าใน db แล้วบันทึกใน cache และก็ส่ง return ออกไป } return $cfg_val;
function load_single( $config_name = '', $return_field = 'config_value' ) { if ( empty( $config_name ) ) {return null;} // load cache driver $this->load->driver( 'cache', array( 'adapter' => 'file' ) ); // check cached if ( ! $cfg_val = $this->cache->get( 'cfgload_'.$config_name.'_'.$return_field ) ) { $this->db->where( 'config_name', $config_name ); $query = $this->db->get( 'config' ); if ( $query->num_rows() > 0 ) { $row = $query->row(); $query->free_result(); $this->cache->save( 'cfgload_'.$config_name.'_'.$return_field, $row->$return_field, 600 ); echo 'no cache'; return $row->$return_field; } $query->free_result(); return null; } return $cfg_val; }// load_single
if ( false=== $cfg_val = $this->cache->get( 'cfgload_'.$config_name.'_'.$return_field ) ) { // no cache, หาค่าใน db แล้วบันทึกใน cache และก็ส่ง return ออกไป } return $cfg_val;
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง