您好,欢迎访问一九零五行业门户网

php var_export读写实例类

//php教程 var_export读写实例类
class user{
 var $filepath;
 function __()
 {
  $this->filepath = d:/www.111cn.net/group/;
 }
 function cache() {
  $array = $this->db->select('select group_id,group_name from group','hashmap');
  $fp = fopen ($this->filepath, 'w');
  fputs($fp, '');
  fclose($fp);
 }
 function getvar_export($value) {
  $array = require($this->filepath);
  foreach ($array as $key => $v) {
   if ($key==$value) {
    $selected = ' current option';
   } else {
    $selected = '';
   }
   $html .= '' . $v . '';
  }
return $html;
 }
}
//使用实例方法
$g = new user();
if( intval( $_get['iscreate']) )
{
 $g->cache();
}
else
{
 $g->getvar_export('vv');
}
//本站原创www.111cn.net转载注明来源
?>
其它类似信息

推荐信息