Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Include Virtual/File
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Include Virtual/File

 Post Reply Post Reply Page  <123
Author
vtech View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote vtech Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2005 at 11:51pm
IF anyone is interested to see how i solved this, here is the code that i used (sorry i couldnt find who coded this to give proper credit or any comments on it but it is pretty understandable)
 
 

<%
Function getFileContents(strIncludeFile)
  Dim objFSO
  Dim objText
  Dim strPage

  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

  Set objText = objFSO.OpenTextFile("D:\Inetpub\wwwroot\myrootfolder/" & strIncludeFile)

  getFileContents = objText.ReadAll

  objText.Close
  Set objText = Nothing
  Set objFSO = Nothing
End Function
%>

<%
Dim strMain

strMain = getFileContents("34efa.htm")

Response.Write strMain
%>

I specified my root folder at the top with the function so all i need to do is include then page other than that everything was pretty much how i found it.
 
Thanks for all the help that directed me towards this solution
VtechClap
Back to Top
 Post Reply Post Reply Page  <123

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.