Include file mystery

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi All

I use include files a lot in ASP, but I was wondering if these files aren't
actually part of ASP at all and you can use them in other web-based files.

Is this possible?



Re: Include file mystery

Fleeing from the madness of the Posted via Supernews, jungle
and said:

Quoted text here. Click to load it

Yes if your host lets you use SSI and if the files are located someplace  
your web server can get to them without script support.

William Tasso

whither a trophy?

Re: Include file mystery

Quoted text here. Click to load it

If you mean Server Side Includes like this: '<!--#include
virtual="insertthisfile.html" -->', you can only use these in ASP pages.
There are equivalents in PHP and most other server-side processing
environments, but the syntax varies. However, if your include file is simply
HTML (or perhaps Javascript) the same files can obviously be used in pages
in each environment.

For example, if you stored your HTML footer in a separate file, you could
include it in all of your ASP and PHP files. Clearly, if the included file
contain server-side code, it would only work correct in those type of pages.


Re: Include file mystery

Astra wrote:

Quoted text here. Click to load it

You need some form of process to convert the include statement to the
content of the file being referenced. ASP syntax is the same as the much
older SSI syntax. PHP has different syntax, as does Template-Toolkit, and
so on.

David Dorward       < <
                     Home is where the ~/.bashrc is

Site Timeline