|
藍森林 http://www.lslnet.com 2006年6月6日 10:18
chdir()求助
想顯示upload form和調用javascript,但是不成功, 是什麼問題呢? 謝謝。
"[color=red]path[/color]"在系統上是存在的
下面是代碼:
[code] #define URL_TARGET "/export/home1/apache/WWW/upload"
int bAttached;
sprintf(path, URL_TARGET"/%s", board);
bAttached = !chdir(path);
if (bAttached)
printf("<script>;\n"\
"function launchWin(url,name,w,h) {\n"\
" settings = \"toolbar=0,scrollbars=1,location=0,status=0,menubar=0,resizeable=1,width=\" + w + \",height=\" + h;\n"\
" return window.open(url,name,settings);\n"\
"}\n"\
"function Upload() {\n"\
" wndUpload = launchWin(\"/cgi-bin/fileupload\", \"wndUpLoad\", 500, 500);\n"\
" wndUpload.focus();\n"\
"}</script>; ");
......
printf("<input type=hidden name=isAttach value=0>;");
if (bAttached) {
printf(" [<a href=\"JavaScript:Upload()\">;上傳附件</a>;] ");
printf("<input type=hidden name=filelist value=\"\">;");
}[/code] |
chdir()求助
什麼意思?
什麼錯誤信息?
你http的應答寫對了麼? |
| |