ÀÚ¹Ù¼Ò½ºÀä db Å×À̺íµî ´ÙÀִµ¥, ÀÚ·á½Ç¿¡ µ¥ÀÌÅÍ ¾÷·ÎµåÇÏ¸é ¿¡·¯°¡³ª³×¿ä.
Ȥ½Ã ¶óµµ Á» ºÁÁֽǼö ÀÖ´ÂÁö... ¿¡·¯ 500³ª³×¿ä ÆäÀÌÁö. ¾÷·Îµå ´©¸£´Â ¼ø°£
'DEXT.FileUpload °³Ã¼ »ý¼º
set o_upload = server.CreateObject("DEXT.FileUpload")
o_upload.DefaultPath = server.mappath("addfile/")
name = trim(o_upload("name"))
title = trim(o_upload("title"))
content = Trim(o_upload("content"))
content = Replace(content,"'","")
o_upload.MaxFileLen = 10*1024*1024 'ÆÄÀÏÅ©±â 2¸Þ°¡·Î Á¦ÇÑ
ntc_addfile = o_upload("filename").Save( ,false ) 'ÆÄÀÏÀúÀå
ntc_addfile = mid(ntc_addfile,InStrRev(ntc_addfile,"\")+1) 'ÆÄÀϸí
Set o_upload = Nothing
SQL = "SELECT Max(ntc_num) FROM data_tab"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL,DBCon
If IsNULL(rs(0)) Then
number = 1
else
number = rs(0) + 1
End If
'/INSERT
sql="INSERT INTO data_tab ("
sql=sql&"name,title,content,filename,ntc_num"
sql=sql&") VALUES ( "
sql=sql&"'"&name&"','"&title&"','"&content&"', '" &ntc_addfile& "','"& number &"')"
'response.write sql
DBCon.Execute sql
RS.Close
Set RS = Nothing
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
alert("µî·ÏµÇ¾ú½À´Ï´Ù..");
document.location.href="./list.asp";
//-->
</SCRIPT>