Parameterized include in Classic ASP with VBScript
- by Thom Smith
I want to write a function that will include an external file, much like Server.Execute, but will pass along parameters. I'm aware that Server.Execute will pass along query parameters, but I'd like to pass data more generally. For instance:
' main.asp
MyInclude("external.inc", Array("mykey", "myval"))
' external.inc
Response.Write mykey
I doubt I can get quite that far without reading the external fine, twiddling it, and executing, but I'd like to get as close as reasonably possible. Also, if possible, I'd prefer avoiding using the query passing option for security reasons.