Tokiwa Battle Royale  GE777
A PHP Battle Royale inspired game
 All Data Structures Namespaces Files Functions Variables Pages
mapitemmng.php
Go to the documentation of this file.
1 <?php
2 if(!defined('IN_ADMIN')) {
3  exit('Access Denied');
4 }
5 if($mygroup < 9){
6  exit($_ERROR['no_power']);
7 }
8 require_once GAME_ROOT.'./include/system.func.php';
9 $sqldir = GAME_ROOT.'./gamedata/sql/';
10 foreach(Array('log','chat','mapitem','newsinfo') as $v){
11 
12  $d = file_get_contents("{$sqldir}{$v}.sql");
13 
14 
15  $a = getmicrotime();
16  if($v=='mapitem'){
17  for($i=0;$i<30;$i++){
18  $d2 = str_replace("\r", "\n", str_replace(' bra_', ' test_'.$i, $d));
19  runquery($d2);
20  }
21  }else{
22  $d = str_replace("\r", "\n", str_replace(' bra_', ' test_', $d));
23  runquery($d);
24  }
25 
26  $b = getmicrotime();
27  $time = ($b-$a)*1000 ;
28  echo "{$v}.sql 执行时间:$time 毫秒 <br>";
29 }
30 
31 
32 
33 
34 
35 
36 //var_dump($db->query("DROP TABLE test_log"));
37 
38 
39 ?>
$sqldir
Definition: mapitemmng.php:9
$i
Definition: botservice.php:267
if(!$action) elseif($action== 'config') elseif($action== 'dbselect') elseif($action== 'environment') elseif($action== 'install') runquery($sql)
Definition: install.php:1213
const GAME_ROOT
Definition: clear.php:6
$_ERROR
getmicrotime()