我需要上傳使用JS文件,文件上傳ASP經典,JS
<input type="file" name="picUpload" id="picUpload" />
<% set pic = Request.Form("picUpload")
set Amount = Request.Form("tbAmountProduct")
set desc = Request.Form("tbDescProduct")
set price= Request.Form("tbPriceProduct")
set pcId =Request.Form("ddlCategoryForProd")
set pbId =Request.Form("ddlBrandForProd")
set pName=Request.Form("tbProductName")
IF((bName<>"")AND(Amount<>"")AND(desc<>"")AND(price<>"")AND(pcId<>"-1")AND(pbId<>"-1")AND (pic<>"")) THEN
set con = Server.CreateObject("ADODB.Connection")
con.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("WebData/DB.mdb") & ";"
set rs = con.Execute("Select * FROM Products WHERE ProductName = '"&pName&"' and mode= true")
IF rs.EOF = true then
SET sql ="Insert Into Products (ProductName,SupID,CatID,Amount,Price,Pic,Description) Values('"&pName&"','"&pbId&"','"&pcId&"','"&Amount&"','"&price&"','"&pic&"','"&desc&"')"
SET rs =con.Execute(sql)%>
我怎樣才能獲得該文件的路徑,並在項目的文件夾,將其鏈接到數據庫,並以特定的文件夾? 非常感謝。
對不起,我編輯代碼 – user2922456
你要的問題是,當你上傳你必須設置你的''