-
加入我們
-
VIP定制
-
求關(guān)注
Thank you for visiting
029-81773686
全網(wǎng)開發(fā)&整合營銷服務(wù)商
CopyRight
?HOOBOO All rights reserved
2016.05.16
Private Function CheckOrCreatePath( ByVal path )
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Dim parts
parts = Split( path, "" )
For Each part in parts
path = path + part + ""
If fs.FolderExists( path ) = False Then
fs.CreateFolder( path )
End If
Next
End Function
修改為
Private Function CheckOrCreatePath( ByVal path )
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Dim parts
Dim root : root = Server.mappath("/") & ""
parts = Split( Replace(path, root, ""), "" )
path = root
For Each part in parts
path = path + part + ""
If fs.FolderExists( path ) = False Then
fs.CreateFolder( path )
End If
Next
End Function
即可正常上傳。如下圖:
CopyRight ? 西安宏博網(wǎng)絡(luò)科技有限公司 備案號:陜ICP備10007014號-8 站點(diǎn)地圖 免責(zé)聲明:本網(wǎng)站部分資源來源于網(wǎng)絡(luò),如有侵權(quán),請聯(lián)系我們告知刪除,我們將會盡快處理,謝謝!本站不承擔(dān)任何法律責(zé)任。