您的位置:首页 > 其它

我写一点个人的

2014-11-10 22:16 295 查看
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

30

31

32

33

34

// some code

<?php

/**

* Installs all tables in the mysql.sql file, using the default mysql connection

*/

/* Change and uncomment this when you need to: */

mysql_connect('localhost', 'root');

if (mysql_errno())

{

die('
Error '.mysql_errno().':
'.mysql_error());

}

mysql_select_db('oauthdemo');

$sql = file_get_contents(dirname(__FILE__) . '/mysql.sql');

$ps = explode('#--SPLIT--', $sql);

foreach ($ps as $p)

{

$p = preg_replace('/^s*#.*$/m', '', $p);

mysql_query($p);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: