//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 .= '';
}
return $html;
}
}
//使用实例方法
Difeye是一款超轻量级PHP框架,主要特点有: Difeye是一款超轻量级PHP框架,主要特点有: ◆数据库连接做自动主从读写分离配置,适合单机和分布式站点部署; ◆支持Smarty模板机制,可灵活配置第三方缓存组件; ◆完全分离页面和动作,仿C#页面加载自动执行Page_Load入口函数; ◆支持mysql,mongodb等第三方数据库模块,支持读写分离,分布式部署; ◆增加后台管理开发示例
0
$g = new user();
if( intval( $_GET['iscreate']) )
{
$g->cache();
}
else
{
$g->getVar_export('vv');
}
//本站原创www.111cn.net转载注明来源
?>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号