|
主题: php论坛里的贴子如何实现在网页里调用?
|
 sheep001
职务:普通成员
等级:1
金币:0.0
发贴:14
注册:2002/10/21 15:53:16
|
#12003/7/16 11:15:51
php论坛里的贴子如何实现在网页里调用?
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:1.0
发贴:400
注册:2001/5/27 23:27:59
|
#22003/7/16 21:16:54
用程序读取数据库然后显示
|
 sheep001
职务:普通成员
等级:1
金币:0.0
发贴:14
注册:2002/10/21 15:53:16
|
#32003/7/17 10:59:43
能告诉我源代码吗?
|
 sheep001
职务:普通成员
等级:1
金币:0.0
发贴:14
注册:2002/10/21 15:53:16
|
#42003/7/17 11:08:57
我曾找到过一个vbnew.php的代码,调用人家的可以,调用我自已的就不可以,是不是因为路径的问题? 谁能帮帮我?
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:1.0
发贴:400
注册:2001/5/27 23:27:59
|
#52003/7/20 18:43:14
这个不是一两句话能说得清楚的,如果觉得自己写程序比较麻烦或有难度的话,不如去某一论坛的官方网站去看看有没有类似的程序.
|
 buzzard
职务:普通成员
等级:1
金币:0.0
发贴:75
注册:2001/12/16 13:25:04
|
#62003/7/21 17:55:23
其实自己写的程序更加简单明了。
|
 谁明浪子心
职务:普通成员
等级:2
金币:1.0
发贴:438
注册:2002/5/24 17:21:01
|
#72003/8/8 20:31:23
[9楼]回复:为什么我的论坛会这样 将以下代码存为一个PHP文件 require("datafile/config.php"); require("datafile/style.php"); require("global.php"); ?> =$styleConfig['skinbg1']?> align="center" valign="middle">:::论坛新帖 ::: | >
$article=file("datafile/newpost.php"); $count=count($article); $c=min($count,10); //显示5个贴子 if($count>10) $use=$count-$c; else $use=0;
for ($i=$count-1; $i>=$use; $i--){ $detail=explode("│",$article[$i]); $file_name=chop($detail[4]); $forumnum=chop($detail[5]);
if ($use>0) $post=$post.$article[$count-1-$i+$use];
if (file_exists('datafile/forumdata.php')) $forumlist=file('datafile/forumdata.php'); $f_count=count($forumlist); for ($z=0; $z<$f_count; $z++) { $f_detail=explode('│',$forumlist[$z]); if($f_detail[0]!='category'){ if(chop($f_detail[3])==$forumnum){ $forumname=$f_detail[1]; }}} if (strlen($detail[0])>=28) $detail[0]=substr($detail[0],0,25)."..."; if (strlen($detail[1])>=10) $detail[1]=substr($detail[1],0,8)."..."; $detail[0]=str_replace('%a%',' ',$detail[0]); $dtime=getfulldate($detail[2]); if ($lmd[2]==$date) $lmdauthor="------"; else $lmdauthor="$lmd[1]"; $lmdtime=get_date($lmd[2]).' '.get_time($lmd[2]);
echo "
$detail[0] | 作者:$detail[1] | {$dtime} | "; } if ($use>0) writetofile("datafile/newpost.php",$post); ?>
更多帖子 |
然后在需要引用的地方打上
一个这么简单的问题折腾了这么久!!
不知道对你有没有用,这是WDB首页调用全部代码!反正我以前的网站能用的!
| |