|
珞珈山水BBS →
电脑网络 →
BBS安装与维护 →
单文区文章阅读
|
| 单文区文章阅读 [返回] |
|---|
|
发信人: doom9@bbs.nju.edu.cn, 信区: BBSDev 标 题: Re: 给NJU-0.9加上文件上载功能(2) 发信站: 南京大学小百合站 (Mon Jun 23 13:10:01 2003) 转信站: WHUBBS!news.tiaozhan.com!news.zixia.net!NJU 出 处: bbs.nju.edu.cn 修改后是不是要在bbspst.c加上一行 printf(" <a href=bbsupload?board=%s>上传附件</a><br>\n", board); 编译通过,页面也出来了 可是我用IE选完图片之后点“上传”时出错: Server error! The server encountered an internal error and was unable to complete your request. Error message: Premature end of script headers: bbsupload2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you think this is a server error, please contact the webmaster Error 500 202.116.160.52 Sun 22 Jun 2003 09:40:20 PM CST Apache/2.0.40 (Red Hat Linux) 该怎么办? 【 在 rwayan.bbs@sbbs.seu.edu.cn (阿言) 的大作中提到: 】 : 续上文 : 1. 修改showfile.c [可选做] : 使得下载文件时,保存的文件名,不再是showfile.* : 而是,上载时的文件名 : 具体如下: : - int cat(int fid) { : + int cat(int fid,char *fshowname) { : char file[80], buf[4000]; : FILE *fp; : int r; : sprintf(file, UPLOAD_PATH"/%d", fid); : + fshowname[35]=0; : .... : - printf("Content-type: application/octet-stream;\n\n"); : + printf("Content-Disposition: filename=%s\nContent-type: a\ : pplication/octet-stream;\n\n",fshowname); : 2.修改Makefile : bbsfwd bbsmnote bbsdenyall bbsdenydel bbsdenyadd \ : bbstopb10 bbsbfind bbstty bbsupload bbsupload2 bbsudel bbsfdoc : bbsdoupload showfile bbsfexp \ : (以下引言省略 ... ...) -- ※ 来源:.南京大学小百合站 bbs.nju.edu.cn.[FROM: 202.116.160.57] |
| [返回单文区目录] |
|
|