導航:首頁 > 文件教程 > asp創建文件夾

asp創建文件夾

發布時間:2024-08-04 07:18:18

Ⅰ asp創建文件

下面是表單代碼
<form id="form1" name="form1" method="post" action="folder.asp">
請指定<span class="STYLE3">文件位置和文件名: <input type="text" name="createflie">
<input type="submit" name="Submit" value="確定" />
</form>
提交到folder.asp
<%
folder = request("createflie")
set fso = server.CreateObject("scripting.filesystemobject")
fso.createfolder(server.MapPath(".\"&folder&""))
response.Write("文件夾創專建成功")
%>

經測試可以創屬建成功

Ⅱ ASP自動創建文件夾並在該文件夾下生成html文件

<%

fname="你的文件襲路徑"
pencat="你的文件內容"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(fname))
fout.WriteLine pencat
fout.close
response.write("文件已成功生成!")
%>
<a href=<%=fname%>>點擊查看</a>

fname="你的文件路徑"
在這里如果你給定的路徑是 job/index.html,那麼就會生成job為名稱的文件夾,而後在其中生成文件index.html。

Ⅲ ASP.NET創建文件夾和創建html文件

// 創建來文件自夾:
if (!Directory.Exists(path))
Directory.CreateDirectory(path);

// 創建文件
string fileName = path + string.Format("test.html");
StreamWriter sw = new StreamWriter(fileName);
sw.Write("html內容");
sw.Close();

閱讀全文

與asp創建文件夾相關的資料

熱點內容
maya粒子表達式教程 瀏覽:84
抖音小視頻如何掛app 瀏覽:283
cad怎麼設置替補文件 瀏覽:790
win10啟動文件是空的 瀏覽:397
jk網站有哪些 瀏覽:134
學編程和3d哪個更好 瀏覽:932
win10移動硬碟文件無法打開 瀏覽:385
文件名是亂碼還刪不掉 瀏覽:643
蘋果鍵盤怎麼打開任務管理器 瀏覽:437
手機桌面文件名字大全 瀏覽:334
tplink默認無線密碼是多少 瀏覽:33
ipaddgm文件 瀏覽:99
lua語言編程用哪個平台 瀏覽:272
政采雲如何導出pdf投標文件 瀏覽:529
php獲取postjson數據 瀏覽:551
javatimetask 瀏覽:16
編程的話要什麼證件 瀏覽:94
錢脈通微信多開 瀏覽:878
中學生學編程哪個培訓機構好 瀏覽:852
榮耀路由TV設置文件共享錯誤 瀏覽:525

友情鏈接