Parameterized include in Classic ASP with VBScript
Posted
by Thom Smith
on Stack Overflow
See other posts from Stack Overflow
or by Thom Smith
Published on 2010-05-26T16:24:05Z
Indexed on
2010/05/27
10:41 UTC
Read the original article
Hit count: 370
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.
© Stack Overflow or respective owner