|
There are two methods:
1, FSO
Dim fso As New Scripting.FileSystemObject
fso.CreateFolder(Server.MapPath(".")&"\user_info\"&Trim(tmpUsername))
fso = Nothing
2. IO.Directory.CreateDirectory
system.IO.Directory.CreateDirectory(Server.MapPath(".")&"\user_info\"&Trim(tmpUsername))
The second method requires setting permissions,
For example, if you want to create a directory on the D drive, right-click on the D drive and add the ASPNET user group to the read and write permissions. Remember, it can only be set in the root directory of the disk. |
|