Problematic Dynamic Includes

Results 1 to 3 of 3

Thread: Problematic Dynamic Includes

  1. #1
    Join Date
    Dec 1969

    Default Problematic Dynamic Includes

    hi all!<BR><BR>i&#039;m using a function like this:<BR><BR>Function IncludeFile(strFileName)<BR><BR> Dim objFileSys<BR> Dim objTextString<BR><BR> Set objFileSys = Server.CreateObject("Scripting.FileSystemObject")< BR> Set objTextString = objFileSys.OpenTextFile(Server.MapPath(strFileName ))<BR><BR> IncludeFile = objTextString.ReadAll<BR><BR> objTextString.Close<BR> Set objTextString = Nothing<BR> Set objFileSys = Nothing<BR><BR>End Function<BR><BR>and i call it like this:<BR><BR>&#060;%<BR>response.write IncludeFile(FileName)<BR>%&#062;<BR><BR> <BR><BR>the problem is that the called file cannot read session values...<BR><BR>for example: if it reads:<BR><BR>"response.write IncludeFile("Profiles/Admins/000.asp")"<BR><BR>the 000.asp cannot read the session variables...<BR><BR>does anyone have a clue?<BR>thanks in advance!<BR><BR>Daniel Engelman. <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Problematic Dynamic Includes

    does this help?<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default That will ONLY work..

    .. for HTML files.<BR><BR>It will NOT work for ASP code.

Posting Permissions

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