SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get content of a file ?

    Hello i am building some web page with template engine and i run on one problem: i want to import a content of some file and then use it in asp script so the solutions are this:

    1: Create file system object and use ReadAll to read the content but there is a problem because it dosent render the importet file i get just the asp code

    2: Create XML object and load the file into the xml but here is another problem this proccess takes quite a lot of time so it will be very slow for the web site especially that i want to import more the one file...

    3: Create file system object and user ReadAll to read the content and then use eval(reasponseString) to execute this code... but i dont belive to much in this solution i dont know why but it seems to me it's not right.....

    4:.... any other solution???

  2. #2
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i would remove any scripting out of those files and just have html. then the file system object should be fine (as well as the xml). i'd put the removed scripts into functions and call them as i needed them.


Bookmarks

Posting Permissions

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