dede不使用js调用非DEDE数据 如论坛等其他cms数据
论坛以PW举例:
I.般实现方法:
更多精彩就在: 51免费论文网|www.jxszl.com
php?action=article&digest=I.&postdate=0&author=0&fname=0&hits=0&replies=0&pre=0&num=VII&length=IV0&order=II">
对搜索引擎很不友好,不能抓取,而且万I.论坛挂了,搞的主站也很慢.
修正方法:
{dede:huataixiangqirunphp=’yes’}
@me=file_get_contents(‘http://bbs.*****.com.cn/new.php?action=article&pre=I.&num=I.0&length=V0&order=II&fidin=I.V&digest=0&postdate=0&author=0&fname=0&hits=0&replies=0′);
{/dede:huataixiangqi}
ok了,是不是很简单啊.
嘿嘿.
注:此方法最好只用在首页,如果在内容也也这样搞,可能生成html很慢
修改论坛new.php:
本来读取论坛的数据是js数据:
document.write("
");
document.write("
");
document.write("
");
document.write("
");
document.write("
");
document.write("
");
document.write("
");
现在不需要js数据,要的是html数据,所以大家需要把论坛new.php里的输出语句中的document.write去掉.
其他程序举例:
{dede:bookrunphp=’yes’}
@me=file_get_contents(‘http://book.myiphones.com.cn/freelist/new.html’);
{/dede:book}
拿来就用,数据读取端格式要对就OK
原文链接:http://www.jxszl.com/biancheng/dedecms/74250.html
最新推荐
热门阅读