1
$content =
2
"<?php
3
// ** MySQL 设置 ** //
4
\$dbname ='$sName'; // 数据库名称
5
\$dbuser = '$sUser'; // MySQL 用户名
6
\$dbpw = '$sPass'; // 和密码
7
\$dbhost = '$h'; // 在 99% 的情况下您无需修改这个值
8
\$tablepre\t=\t'$tablepre'; //数据表前缀
9
10
\$serPath\t=\t'$AbsolutePath';\t\t//服务器根目录(绝对路径)
11
\$sitePath\t=\t'$sPath'; //网站根目录(相对服务器根目录路径)
12
\$siteUrl = '$siteUrl';
13
14
15
include('DB_connect.inc.php');
16
?>";
17
include('fun.inc.php');
18
writeover("global.php",$content);
19
?>
20
21
function writeover($filename,$data,$method="rb+"){
22
@touch($filename);
23
if($handle=@fopen($filename,$method)){
24
flock($handle,LOCK_EX);
25
fputs($handle,$data);
26
if($method=="rb+") ftruncate($handle,strlen($data));
27
fclose($handle);
28
}
29
}

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29
