"Paul Baker" <ask> wrote in message
news:Oic0mpcXDHA.1280tk2msftngp13.phx.gbl...The PHP code below works...> Mike,
> I don't follow this exactly. In your third paragraph, what is a concrete
> example of what you can do with PHP but not ASP?
' some index.php buried several levels down
include( $_SERVER["DOENT_ROOT"] . "/templates/_main.php" );
include( "_data.php" ); <--- IN SAME DIR AS INDEX.PHP
include( "_content.php" ); <--- IN SAME DIR AS INDEX.PHP
The ASP code below doesn't work...
' some index.asp buried several levels down
<!--#include file="./data.asp"--> <-- IN SAME DIR AS INDEX.ASP
<!--#include file="./content.asp"--> <-- IN SAME DIR AS INDEX.ASP
I can't seem to include relative to the parent file when using nested
includes in ASP like I can when using PHP. I'd really like to be wrong or
maybe have a misconfigured server, but the doentation I've read states
that 'include file' includes the file that is located in the same directory
as the file with the include statement.
This isn't a slam on ASP or a PHP vs ASP attempt... I actually prefer ASP.
I just saw something I liked in PHP that I wasn't able to duplicate in ASP
on IIS 4.0.
There are workarounds, but the only one that will allow me to use ASP code
in the innermost included file is server.execute which isn't available until
5.0 (we might move to IIS 6.0 but my Win2k3 trial server is currently
offline so I haven't tested).