我得phplibbbs.c中
snprintf(buf, MAXPATH, "%s/%s_%d", ATTACHTMPPATH, currentuser->userid, getcurrentuinfo_num());
然后site.php
$attachdir="/home/bbs/boards/_attach/" . $userid . "_" . $utmpnum ;
发附件了以后,能显示有附件,但是附件,例如,图片,显示不出来,
点击以后出现下面若干错误
Warning: unpack(): Type N: not enough input, need 4, have 0 in /home/siyuwww/htdocs/wForum/bbscon.php on line 133
Warning: Cannot modify header information - headers already sent by (output started at /home/siyuwww/htdocs/wForum/bbscon.php:133) in /home/siyuwww/htdocs/wForum/bbscon.php on line 135
Warning: Cannot modify header information - headers already sent by (output started at /home/siyuwww/htdocs/wForum/bbscon.php:133) in /home/siyuwww/htdocs/wForum/bbscon.php on line 137
Warning: Cannot modify header information - headers already sent by (output started at /home/siyuwww/htdocs/wForum/bbscon.php:133) in /home/siyuwww/htdocs/wForum/bbscon.php on line 138
Warning: Cannot modify header information - headers already sent by (output started at /home/siyuwww/htdocs/wForum/bbscon.php:133) in /home/siyuwww/htdocs/wForum/bbscon.php on line 139
Warning: fread(): Length parameter must be greater than 0. in /home/siyuwww/htdocs/wForum/bbscon.php on line 140
你是怎么解决这个得
【 在 atppp@bbs.stanford.edu-SPAM.no (Big Mouse) 的大作中提到: 】
: 这个问题以前说过了,我在重提一次希望smth能改吧。
: bbs2www/phplib/phplibbbs.c bbs_postarticle()函数是这样写的:
: #if USE_TMPFS==1
: snprintf(buf,MAXPATH,"%s/home/%c/%s/%d/upload",TMPFSROOT,toupper(currentuser->userid[0]),
: currentuser->userid,getcurrentuinfo_num());
: #else
: snprintf(buf,MAXPATH,"%s/%s_%d",ATTACHTMPPATH,currentuser->userid,getcurrentuinfo_num());
: #endif
: 这个地方是获取上传文件目录的,和site.php里面的getattachtmppath()函数完全没有关系,但是,这两个地方必须严格一致才能保证上传文件运行正常。我设想的一种改法是,把
: getattachtmppath()放进phplibbbs.c里面,然后bbs_postarticle()也调用这个函数,
: site.php里面去掉这个函数。
: ...................
--
FROM 210.26.57.*