/** * 执行sql * @param array $queries * @return */ private function execSql($queries) { $count = count($queries); for ($i = $this->step; $i < $count; $i++) { $sql = trim($queries[$i]); if (strstr($sql, 'CREATE TABLE')) { // CREATE TABLE preg_match('/CREATE TABLE `([^ ]*)`/', $sql, $matches); if (mysql_query($sql)) { $info = '<li>' . current_state_support("创建数据表{$matches[1]}完成") . '</li>'; } else { $info = '<li>' . current_state_support("创建数据表{$matches[1]}失败") . '</li>'; } $this->closeDb(); $this->ajaxReturn(array('step' => ++$i, 'info' => $info)); } else { // DROP TABLE 或 INSERT INTO mysql_query($sql); } } $this->step = $i; }
private function getGDInfo() { if (function_exists('gd_info')) { $gd = gd_info(); return current_state_support($gd['GD Version']); } return current_state_unsupport('不支持'); }