这个问题以前说过了,我在重提一次希望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里面去掉这个函数。
但是这个改动似乎有点大了,反正如果大家碰到问题知道是这里要调整就好了。
【 在 luobeng@lzusiyu.org (罗嘣) 的大作中提到: 】
: 开始shi
: $attachdir="cache/home/" . strtoupper(substr($userid,0,1)) . "/" . $userid . "/" . $utmpnum ."/upload";
: 但是这个建立不料
: 后来我 改成了
: $attachdir="cache/upload";
: 说上传成功了,但是实际上没有东西
: 也引用不出来
: 【 在 atppp@bbs.stanford.edu-SPAM.no (Big Mouse) 的大作中提到: 】
: : 检查你wForum/inc/site.php里面getattachtmppath的定义。
--