我想注册一个用户,然后在网站的根目录下自动创建一个以注册名为名字的文件夹(这个已经解决),然后将网站根目录下的page文件夹复制到刚创建的文件夹中(需要各位解决).
谢谢!!
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from users"
rs.open sql,conn,3,3
username=Request("username")
url=replace(Request.ServerVariables("script_name"),"config.asp","")
fullpath=server.MapPath(".")&"\"&username&"\"
userurl="http://"&Request.ServerVariables("server_name")&""&left(url,instrRev(url,"/",len(url)-1))&""
'以上三行代码不要修改
rs.addnew
rs("username") =Request("username")
rs("userpwd") =Request("userpwd")
rs("url") =userurl&username
rs("blogname") =Request("blogname")
rs("blogdom") =Request("blogdom")
rs("date") =date()
rs.update
session("username")=request("username")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
userpath=fullpath&username
if fso.FolderExists(userpath) then
response.redirect("error.asp?error=userfolder")
response.end
else
set fso=CreateObject("Scripting.FileSystemObject")
fso.createfolder(fullpath)
end if
'我想把 fullpath 目录下的page文件夹复制到刚建立的那个文件夹下
'这里怎么写语句?
'谢谢!
rs.close
set rs=nothing
Response.Write "<SCRIPT LANGUAGE='JavaScript'>"
Response.Write "alert('恭喜您!您已经成功提交了信息,\n请单击确定返回!');"
Response.Write "window.location='"
Response.Write (userurl&username)
Response.Write "'</SCRIPT>"
%>