加入收藏 | 设为首页 | 会员中心 | 我要投稿 鹤壁站长网 (https://www.0392zz.cn/)- 分布式云、存储数据、视频终端、媒体处理、内容创作!
当前位置: 首页 > 教程 > 正文

火车头采集器免登录采集数据发布到DEDECMS的方法

发布时间:2022-09-02 10:08:22 所属栏目:教程 来源:互联网
导读:将dede/config.php中的下面代码: 01 //检验用户登录状态 02 03 04 $cuserLogin = new userLogin(); 05 06 if($cuserLogin-getUserID()==-1) 07 08 { 09 10 header(location:login.php?gotopage=.urlencode($dedeNowurl)); 11 12 exit(); 13 14 } 修改为: 0
  将dede/config.php中的下面代码:
 
  01
  //检验用户登录状态
  02
   
  03
   
  04
  $cuserLogin = new userLogin();
  05
   
  06
  if($cuserLogin->getUserID()==-1)
  07
   
  08
  {
  09
   
  10
      header("location:login.php?gotopage=".urlencode($dedeNowurl));
  11
   
  12
      exit();
  13
   
  14
  }
  修改为:
 
  01
  //检验用户登录状态
  02
  $cuserLogin = new userLogin();
  03
  if($cuserLogin->getUserID()==-1)
  04
  {
  05
  if($my_u != '')
  06
  {
  07
  $res = $cuserLogin->checkUser($my_u,$my_p);
  08
  if($res==1)
  09
  $cuserLogin->keepUser();
  10
  }
  11
  if($cuserLogin->getUserID()==-1)
  12
  {
  13
  header("location:login.php?gotopage=".urlencode($dedeNowurl));
  14
  exit();
  15
  }
  16
  }
  然后火车头发布模块修改为
  article_add.php?my_u=你后台用户名&my_p=你后台密码

(编辑:鹤壁站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读