我写一点个人的
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); |
相关文章推荐
- 简单看了一下源码的实现,这里贴一点个人觉得比叫重要的代码。
- (转载)个人对Chrome Web Store的一点想法
- 个人对kobject的一点研究
- RBF的一点个人理解
- 关于滚动图片停在浏览器边界上的一点解决办法(个人愚见)。。
- 【技术交流】Java学习方法的一点个人见解-(上)
- 关于REST的一点个人分析
- 关于微信小程序的一点个人总结
- 关于SVM的一点个人理解
- 记录个人对translate()的一点理解
- 关于PCB行业三巨头的一点个人评价
- 运营电影网站的一点个人心得
- 我对个人使用过的数据库的一点个人体会
- ios里面 Localizable.strings文件一点小知识(个人理解)
- XMLHttpReques和window.event的一点笔记(这只是个人的一些笔记,记下来只是为了备忘)
- 关于RNN(Seq2Seq)的一点个人理解与感悟
- osc代码托管页面的一点页面问题(属于个人观点)
- 关于Python IDE选择的一点个人见解
- 个人对kobject的一点研究