Name replacement in #include

Results 1 to 2 of 2

Thread: Name replacement in #include

  1. #1
    Steve Lane Guest

    Default Name replacement in #include

    I want to use use the #include in my script, but for the file name to the a variable holding the contents of a DB field.<BR><BR>Can it be done, or is the #inlcude processed before the asp script ?<BR>

  2. #2 Guest

    Default RE: Name replacement in #include

    You cannot replace the file name dynamically. The only thing that I can think of is to create a temporary asp file in which you vary the file name for the include. Then redirect to it.<BR><BR>This is only necessary if the include file is actually intended to be processes. If the file is just intended to include some data, then you should just use the FileSystem Object to read the file and out put its contents to the page. <BR><BR>I have seen this same request a few times lately, and I just wonder why you would want to do this. If you just let me know what is the ultimate aim of your script, then I may be able to tell you if there is a better way.

Posting Permissions

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