<blockquote id="15iad"><noscript id="15iad"><xmp id="15iad">
<td id="15iad"><strike id="15iad"></strike></td><track id="15iad"><strike id="15iad"><tt id="15iad"></tt></strike></track>

<table id="15iad"></table>

    1. 0712-2888027 189-8648-0214
      微信公眾號

      孝感風信網絡科技有限公司微信公眾號

      當前位置:主頁 > 技術支持 > DedeCMS > DedeCMS啟用二級域名后,會員同步登錄的方法

      DedeCMS啟用二級域名后,會員同步登錄的方法

      時間:2023-06-12來源:風信官網 點擊: 207次

      織夢啟用二級域名后 由于DEDEAjax不能跨域所以使用ajax返回登錄數據 不能成功 網上找了很長時間 對ajax跨域實在是找不到比較好的方法所以暫時采用以下方法替代:
      第一步,在member文件夾處建立一個PHP文件,名字為“ajax_index_loginsta_s.php”。
      第二步,給這個文件中填寫的代碼為:
      <?php
      require_once(dirname(__FILE__)."/config.php");
      AjaxHead();
      if($myurl == '')
      {
      echo "document.write('<div id=_userlogin>');";
      echo "document.write('<form name=userlogin action=".$GLOBALS['cfg_cmsurl']."/member/index_do.php method=POST>');";
      echo "document.write('<input type=hidden name=fmdo value=login />');";
      echo "document.write('<input type=hidden name=dopost value=login />');";
      echo "document.write('<input type=hidden name=keeptime value=604800 />');";
      echo "document.write('<div class=s1>用戶名</div><div class=s2><input type=text name=userid /></div> ');";
      echo "document.write('<div class=s1>密碼</div><div class=s2><input name=pwd type=password /></div> ');";
      echo "document.write('<div class=s1>驗證碼</div><div class=s2 id=s2><input name=vdcode type=text maxlength=4 /></div>');";
      echo "document.write('<div class=simg><img src=".$GLOBALS['cfg_cmsurl']."/include/vdimgck.php width=50 height=20 /></div><div class=s3><input type=submit value=登錄 /> </div>');";
      echo "document.write('<div class=s1><a href=".$GLOBALS['cfg_cmsurl']."/member/resetpassword.php target=_blank>忘記密碼?</a> <a href=".$GLOBALS['cfg_cmsurl']."/member/index_do.php?fmdo=user&dopost=regnew target=_blank><font color=#FF0000>免費注冊</font></a></div>');";
      echo "document.write('</form></div>');";
      exit('');
      }
      $uid = $cfg_ml->M_LoginID;
      $face = $cfg_ml->fields['face'] == '' ? $GLOBALS['cfg_memberurl'].'/images/nopic.gif' : $cfg_ml->fields['face'];
      echo "document.write('<div class=s5><b>".$cfg_ml->M_UserName."</b> 歡迎登陸XXXXXXXX!<a href=".$cfg_memberurl."/index.php>會員中心</a> | <a href=".$cfg_memberurl."/edit_fullinfo.php>帳戶</a> | <a href=".$myurl.">我的Blog</a> | <a href=".$cfg_memberurl."/index_do.php?fmdo=login&dopost=exit><font color=#FF0000>退出登陸</font></a></div>');";
      ?>

      適當的自己修改吧,我這個主要用在頂部登陸,所以都是橫著放的。

      第三步,把所有需要添加登陸的頁面中增加一行代碼:
      <script language="javascript" type="text/javascript" src="http://你的域名/member/ajax_index_loginsta_s.php"></script>

      欄目列表
      推薦內容
      熱點內容
      展開
      96精品专区国产在线观看高清
      <blockquote id="15iad"><noscript id="15iad"><xmp id="15iad">
      <td id="15iad"><strike id="15iad"></strike></td><track id="15iad"><strike id="15iad"><tt id="15iad"></tt></strike></track>

      <table id="15iad"></table>