Creating new folders at my site.

Results 1 to 2 of 2

Thread: Creating new folders at my site.

  1. #1
    Tery Guest

    Default Creating new folders at my site.

    Similiar to GeoCities, I want to provide the functionality whereby a user can log on and create his/her own web-page (via templates). What I can&#039t figure out is how to dynamically create the folder for this user.<BR><BR>Any help is greatly appreciated. Please reply to my email:<BR>temilson@sk.sympatico.ca<BR><BR>Thank you!

  2. #2
    ASP_DRUG_DEALER Guest

    Default RE: Creating new folders at my site.

    Hope this helps. I wrote this bit a while back messing around with the same idea.<BR><BR>DRUG_DEALER<BR><BR>&#060;%<BR>&#039I have seen this question asked a couple of times.<BR>&#039"can I create a web site on the fly? eg. www.mydomain/companyname.<BR>&#039this could be used for many things...create websites for your users_<BR>&#039on the fly. Just an idea...<BR>&#039 Let me know what you think,<BR><BR><BR>Dim strNewCompanyName<BR>&#039get company name form other form, or you could pull it out of a db.<BR>strNewCompanyName = Request.Form("companyname")<BR>If strNewCompanyName = "" Then<BR>Response.Write("&#060;STRONG&#062;&#060;CE NTER&#062;No Company to make a website for.&#060;/CENTER&#062;&#060;/STRONG&#062;")<BR>Else<BR>&#039make sub file for website.<BR>&#039www.mysite.com/theirfolder<BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>Set objNewSite = objFSO.CreateFolder(Server.Mappath("./" & strNewCompanyName))<BR>set objNewSite = nothing<BR>&#039make the default page, this could be asp or htm, html<BR>Set objFile = objFSO.OpenTextFile(Server.Mappath("./" & strNewCompanyName & "/" & "default.asp" ),8,True)<BR>&#039design the layout then fill in the blanks _<BR>&#039 with different variables and such.<BR>objFile.Writeline("&#060;HTML&#062;")<BR> objFile.Writeline("&#060;HEAD&#062;&#060;TITLE&#06 2;" & strNewCompanyName & "&#060;/TITLE&#062;&#060;/HEAD&#062;")<BR>objFile.Writeline("&#060;BODY BGCOLOR=""#ffe7a5""&#062;")<BR>objFile.Writeline(" &#060;H1&#062;&#060;DIV ALIGN=""CENTER""&#062;DOUG NEEDS A JOB!&#060;/DIV&#062;&#060;/H1&#062;<BR>")<BR>objFile.Writeline("I Really could use a job!<BR>")<BR>objFile.Writeline("&#060;B&#062;Poor student in southern IL!&#060;/B&#062;<BR>")<BR>objFile.Writeline("&#060;B&#062;S outheast MO, Western KY?&#060;/B&#062;<BR>")<BR>objFile.Writeline("&#060;I&#062;I nternship?&#060;/I&#062;<BR>")<BR>objFile.Writeline("SOME OTHER VARIABLES AND CONTENT GO HERE.<BR>")<BR>objFile.Writeline("YOU COULD EVEN FORMAT A TABLE OR DO A DB CONNECTION.<BR>")<BR>objFile.Writeline("What about doing some includes?<BR>")<BR>objFile.Writeline("Just an idea..<BR>")<BR>objFile.Writeline("&#060;/BODY&#062;")<BR>objFile.Writeline("&#060;/HTML&#062;")<BR>objFile.close<BR>End If<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •