i漂泊

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3347|回复: 0

[升级计划] 好团队插件开发工具之数据表数据导入方法

[复制链接]
TA的礼物信息
  • 收到:0
  • 送出:2
发表于 2015-12-16 09:44:52 | 显示全部楼层 |阅读模式
  我们为了满足开发者对历史数据导入的需求,所以在
  1. install.php
复制代码
中放置了钩子,那么今天我们就来仔细描述下如何使用:
  1. case 'import':
  2.         $infiles = array('install_import_data');
  3.         CheckModule($pname,$infiles);
  4.         cpmsg(unie('⑥数据导入及临时文件创建'), "{$insurl}&step=ok", 'loading');
  5.         break;
复制代码
文件必须放置在
  1. install
复制代码
文件夹中且文件命名规则必须含有
  1. install_import_data
复制代码
同时我们也在install文件中放置了案例:
  1. <?php
  2. /*
  3. * CopyRight  : [Discuz!] (C)2001-2099 HaoTeam Inc.
  4. * Document   : install_xx.php
  5. * Created on : 2014-3-20,19:54:48
  6. * Author     : 51漂泊(51piaobo) www.51piaobo.com $
  7. * Description: This is NOT a freeware, use is subject to license terms.
  8. *              这即使是一个免费软件,使用时也请遵守许可证条款,得到当时人书面许可。
  9. *              未经书面许可,不得翻版,翻版必究;版权归属51漂泊;
  10. */

  11. if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
  12.     exit('Access Denied');
  13. }

  14. $sql1 = <<< EOF

  15. EOF;
  16. runquery($sql1);
  17. ?>
复制代码
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

QQ|小黑屋|手机版|IPiaoBo Inc. ( 渝ICP备17002826号 )

GMT+8, 2024-4-19 17:55 , Processed in 0.078568 second(s), 47 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表