{dede:global.cfg_webnam" /> <meta name="Robots" content="All"> <link type="text/css" rel="stylesheet" href="/images/style.css"> <link type="text/css" rel="stylesheet" href="/images/news.css"> <script language="javascript" type="text/javascript" src="/include/dedeajax2.js"></script><meta http-equiv="mobile-agent" content="format=xhtml;url=/m/biancheng/dedecms/76462.html"><script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="/m/biancheng/dedecms/76462.html";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script> <!--统计---> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?da17b15dbdd6f888f0aa16735c431699"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </head> <body> <div class="head"> <div class="head-main clearfix"> <h1 class="hidden">"景先生毕设|www.jxszl.com</h1> <a href="http://www.jxszl.com/" class="logo"><img src="/images/logo.png" title="景先生毕设|www.jxszl.com"></a> <div class="banner"> <div class="logo_center_search1"> <form action="/plus/search.php"> <input name="kwtype" value="0" type="hidden"> <input name="q" class="s_input" value="搜索 关键词..." onclick="if(this.value == '搜索 关键词...'){this.value = '';}" onblur="if(this.value == ''){this.value = '搜索 关键词...'};" type="text"> <button type="submit" class="s_btn">搜 索</button> </form> </div> </div> <ul class="nav_sub"> </ul> </div> <div class="nav"> <div class="nav-tp"> <ul> <li class=""><a href="/" >首页</a> </li> <li><a href="http://www.jxszl.com/jsj/" target="_self">计算机</a></li> <li><a href="http://www.jxszl.com/jmgl/" target="_self">经贸管理</a></li> <li><a href="http://www.jxszl.com/wgy/" target="_self">外国语</a></li> <li><a href="http://www.jxszl.com/jxgc/" target="_self">机械工程</a></li> <li><a href="http://www.jxszl.com/ysl/" target="_self">艺术类</a></li> <li><a href="http://www.jxszl.com/dzxx/" target="_self">电子信息</a></li> <li><a href="http://www.jxszl.com/rwxy/" target="_self">人文学院</a></li> <li><a href="http://www.jxszl.com/swgc/" target="_self">生物工程</a></li> <li><a href="http://www.jxszl.com/hxycl/" target="_self">化学与材料</a></li> <li><a href="http://www.jxszl.com/yxlw/" target="_self">医学论文</a></li> </ul> </div> <div class="nav-bottom"> <ul> <font color="#FF0000"><li><a href="http://www.jxszl.com//biancheng/dedecms" target="_blank">DEDECMS:</a></li></font><li><a href="http://www.jxszl.com//biancheng/C">C#</a></li><li>|</li><li><a href="http://www.jxszl.com//biancheng/JAVA">JAVA</a></li><li>|</li><li><a href="http://www.jxszl.com//biancheng/shujuku">数据库</a></li><li>|</li><li><a href="http://www.jxszl.com//biancheng/python">python</a></li><li>|</li> </ul> </div> </div> </div> <!-- 内容 --> <?php include_once("baidu_js_push.php") ?> <div class="main"> <div class="content mt10"> <div class="contentmt11"> <div class="gads pt10"> <div class="width_g1"> <!-- 980*150 --> <ins class="adsbygoogle" style="display:inline-block;width:980px;height:150px" data-ad-client="ca-pub-6529562764548102" data-ad-slot="9315568882"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="width_g2"> <!-- 右上300*155 --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:155px" data-ad-client="ca-pub-6529562764548102" data-ad-slot="4915387313"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="news-con"> <div class="news-con-blk"> <div class="hd"> <h1>织梦站点内容自动更新到新浪微博</h1> <div class="tit-bar"><span>2022-10-29 16:41</span><span>编辑: www.jxszl.com</span><a href="http://www.jxszl.com/" target="_blank" class="site">景先生毕设</a></div> </div> <div class="weizhi_f"> <div class="bdsharebuttonbox"> <A class=bds_more href="http://share.baidu.com/code#" data-cmd="more"></A><A class=bds_qzone title=分享到QQ空间 href="http://share.baidu.com/code#" data-cmd="qzone"></A><A class=bds_tsina title=分享到新浪微博 href="http://share.baidu.com/code#" data-cmd="tsina"></A><A class=bds_tqq title=分享到腾讯微博 href="http://share.baidu.com/code#" data-cmd="tqq"></A><A class=bds_renren title=分享到人人网 href="http://share.baidu.com/code#" data-cmd="renren"></A><A class=bds_weixin title=分享到微信 href="http://share.baidu.com/code#" data-cmd="weixin"></A> </div> <script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "1", "bdSize": "16" }, "share": {} }; with (document)0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script> </div> <div class="news-body"> <div class="articlegg_a2"> <!-- 内嵌275*330 --> <ins class="adsbygoogle" style="display:inline-block;width:275px;height:330px" data-ad-client="ca-pub-6529562764548102" data-ad-slot="9686962721"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> 新浪微博是利用feed找到更新文章的.只要给他指定feed地址就可以成功关联啦.<br/><br/>现在开始动手简单修改I.下织梦的<b><a href="http://www.jxszl.com/jlmb/" target="_blank">模板</a></b>,由于织梦不能生成全站的xml文件,所以要先建立生成全站XML的php程序.<br/><br/>I.,建立feed.php<br/><br/><?xmlversio<div class="fyadd2"> <script async src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6529562764548102" crossorigin = "anonymous"></script> <!--手机630 + 85--> <ins class="adsbygoogle" style="display:inline-block;width:630px;height:85px" data-ad-client="ca-pub-6529562764548102" data-ad-slot="6284556726"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({ }); </script> </div><br/><span id="51jrft" class="51jrft" style="font-size:13px;font-weight: bold; background-color:#FFDEAD;"> 更多精彩就在: <b><a href="http://www.jxszl.com/" target="_blank">51<b><a href="http://www.jxszl.com/lwqt/mflw/" target="_blank">免费论文</a></b>网</a>|www.jxszl.com</b> </span><br />n="I..0"encoding="gbIIIIII.II"?><br/><rssversion="II.0"><br/><channel><br/><title>{dede:global.cfg_webname/}
{dede:global.cfg_basehost/}
{dede:global.cfg_description/}
zh-cn
{dede:global.cfg_webname/}
{dede:global.cfg_adminemail/}
{dede:arclistrow=’VI0′col=’I.′titlelen=’I.00′orderby=’pubdate’}

[field:arcurl/]
<![CDATA[[field:titlefunction=htmlIItext(@me)/]]]>
[field:writer/]
[field:typename/]
[field:pubdatefunction=strftime("%a,%d%b%Y%H:%M:%S+0VIII00",@me)/]
[field:arcurl/]


{/dede:arclist}




需要注意的是,别忘了把我的网址改成你自己需要的.


III,修改index.htm主页模板

由于新浪微博只能验证网址,不能写完整路径,比如我写的是:.结果提示关联失败,解决的办法是,在和中间加入下面的代码



通过以上方法就可以成功关联新浪微博了.


原文链接:http://www.jxszl.com/biancheng/dedecms/76462.html