| [ WWW ] in KIDS 글 쓴 이(By): wang (Chip쟁이) 날 짜 (Date): 1998년03월28일(토) 19시37분52초 ROK 제 목(Title): Re: [Q] HTTP File Upload 저는 binary file도 잘되던데요. 아래는 제가 upload를 test해본 CGI script입니다. -------------------- cut here ------------------------ #!/opt/gnu/bin/perl use CGI_Lite; $InCGI = new CGI_Lite(); %FormData = $InCGI->parse_form_data(); print "Content-type: text/html\n\n"; print "<center><b> thank you</b> for running my perl program.</center><hr>"; $filename = $FormData{"file"}; @args = ("/usr/bin/mv","$filename","file이 저장될 filename"); system(@args); print "<img src=저장된 file의 URL>"; ------------------ cut here ---------------------------- 요렇게 하니까 그림 파일도 잘 upload가 되던데요.. 참고적으로 Upload를 test한 html 파일도 함께 올립니다. ------------------ cut here --------------------------- <html> <head> <title>upload</title> </head> <form enctype="multipart/form-data" method="POST" action="CGI Script의 URL"> <table border=0 cellspacing=2 cellpadding=3> <tr> <TD BGCOLOR="#FFDBED" align=center> <FONT FACE="verdana" COLOR="#004080" SIZE=+1>File</font></td> <td><input type="file" name="file" size=40> </tr> </table> <p> <ul><input type="submit" name="submit" value="Submit"> </ul> </form> </body> </html> -------------------- cut here ----------------------------- |