Re: Include file

From: Date: Sun, 24 Dec 2000 23:34:03 +0000
Subject: Re: Include file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-31768@lists.php.net to get a copy of this message
Mike mpeloso@princeton.edu: > This is not a .php file it is an .shtml.It works on my host but not on my > development machine. > The file is shtml.and the syntax is <!--#include file="heading.htm" --> To have Server Side Includes running you must tell Apache to accept that. Edit your httpd.conf file. On my win98 pc it's at e:/Program Files/Apache Group/Apache/conf Make a backup [!]. First find this section: # # To use server-parsed HTML files # AddType text/html .shtml AddHandler server-parsed .shtml And make sure there are no #'s before the last two lines. Then find the permission section. At home you can savely modify the first '<directory>' part from the very restrictive <Directory /> Options FollowSymLinks AllowOverride None </Directory> That Apache comes with to <Directory /> Options FollowSymLinks Includes AllowOverride Options </Directory> Now save, restart Apache. It should work. MR suggested : > > Try > > <? include "heading.htm"; ?> > > Also try to rename heading.htm to heading.php. that would work but i think it needs php running. To have php running you also need to adapt the httpd.conf file. Find some sites and read a lot. Chris -------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------

« previous php.general (#31768) next »