Including a file from another source?

Including a file from another source?

Post by Sean Phillip » Sun, 11 Jan 1998 04:00:00



I would like to insert a text file or RTF in the middle of a web page.
For example... I have created a newsletter template and I would like and
end user to be able to save the text for part of the newsletter on the
webserver without allowing them to actually work with the newsletter
page.
Any Ideas???

I've heard SSI but I don't know the code. I use PWS at home and IIS4 at
work.

Thanx
Sean

 
 
 

Including a file from another source?

Post by Dave Beauchemi » Sun, 11 Jan 1998 04:00:00


Quote:>I would like to insert a text file or RTF in the middle of a web page.
>For example... I have created a newsletter template and I would like and
>end user to be able to save the text for part of the newsletter on the
>webserver without allowing them to actually work with the newsletter
>page.
>Any Ideas???

>I've heard SSI but I don't know the code. I use PWS at home and IIS4 at
>work.

SSI is very easy.  First, select the place in your code where you want to
include the text file.  Next, change the extension to INC instead of RTF or TXT
(it will not affect the end page - just think of SSI as cut & copy into your
HTML code).  Next, make sure that you save the page with an ASP extension, or it
won't work.

Now, you have two choices: you can use a virtual include or a file type include.
The difference is that one goes from the root of the server, and the other is
from the current directory.  For example, if you are in the \Samples\webs\Test
directory of your web, and the file you want to include is in the same
directory, and is named "MyTextFile.inc", then simply use:

<!--#INCLUDE FILE="MyTextFile.inc"-->

Now, if the file is in the \MyWeb\Test directory, then you would use:

<!--#INCLUDE VIRTUAL="\MyWeb\Test\MyTextFile.inc"-->

Personally, I prefer "File" includes, and I simply place the INC file in the
same directory as the other pages of my web.

Hope this helps,

Dave Beauchemin
Microsoft MVP
www.charteau.com/dave

 
 
 

Including a file from another source?

Post by MD » Mon, 12 Jan 1998 04:00:00


There is a simpler way:

The use of the .inc and making the page a ASP page is not required to use
SSI.  In fact if you have a ASP page it must be stored in a directory that
has execute permissions which may be outside of the main pages. ASP can also
be expensive to invoke if this is the only use for it.

Include the SSI directive as advised. But save the file with a .stm
extension. The .stm extension signals the http server (MS PWS or IIS) that
the document contains SSI directives.

Please note the registry will need to be modified to enable the feature. The
normal cautions about backups, etc. apply here.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3Svc\Parameters\Server
SideIncludesExtension
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3Svc\Parameters\Server
SideIncludesEnabled

--
MD - Microsoft FP MVP
http://WebsUnlimited.com
FP J-BOTS / SEND IT!
FP Web Hosting
FP Programming

Quote:>>I would like to insert a text file or RTF in the middle of a web page.
>>For example... I have created a newsletter template and I would like and
>>end user to be able to save the text for part of the newsletter on the
>>webserver without allowing them to actually work with the newsletter
>>page.
>>Any Ideas???

>>I've heard SSI but I don't know the code. I use PWS at home and IIS4 at
>>work.

>SSI is very easy.  First, select the place in your code where you want to
>include the text file.  Next, change the extension to INC instead of RTF or
TXT
>(it will not affect the end page - just think of SSI as cut & copy into
your
>HTML code).  Next, make sure that you save the page with an ASP extension,
or it
>won't work.

>Now, you have two choices: you can use a virtual include or a file type
include.
>The difference is that one goes from the root of the server, and the other
is
>from the current directory.  For example, if you are in the
\Samples\webs\Test
>directory of your web, and the file you want to include is in the same
>directory, and is named "MyTextFile.inc", then simply use:

><!--#INCLUDE FILE="MyTextFile.inc"-->

>Now, if the file is in the \MyWeb\Test directory, then you would use:

><!--#INCLUDE VIRTUAL="\MyWeb\Test\MyTextFile.inc"-->

>Personally, I prefer "File" includes, and I simply place the INC file in
the
>same directory as the other pages of my web.

>Hope this helps,

>Dave Beauchemin
>Microsoft MVP
>www.charteau.com/dave

 
 
 

1. FP <!-- webbot include vs <!--#include file

I want to use the SSI command "<!--#include" rather than FP2K's
"<!--webbot " command.

Why doesn't FP2K support this in the same way as webbot?

2ndly, I want to edit (some of) my includes outside FP2K to prevent it
from adding FP <meta> tags to the include.

Will FP2K ommit its own meta tags in an include before it includes it,
or will it include them again?

Many thanks,
--
Frederik

Sent via Deja.com http://www.deja.com/
Before you buy.

2. PalmSurvival Kit & Screen Protectors

3. FP2002 #include file to #include virtual

4. Fast Compress function

5. include files not including

6. OS/2 <-> UNIX graphics/image libraries

7. Including Files? (INCLUDE VIRTUAL)

8. I'm-a gonna ask for 'HunchBack- the Adventure".

9. How to include a .txt file with the include WebBot?

10. Frontpage 2000 - Reduction in Size (part of source code included)

11. URGENT: FP search tool includes HTML from source frame.

12. include htm files in another htm file?

13. Adding <!--#Include virtual file Globally 2 all htm files