I'm experimenting around with Server Side Includes. I have them working fine using a .html extension.
Trial.html file is below:
<html> <body> <!--#include virtual="HelloWorld.html" --> </body> </html>
The .htaccess file looks like this:
AddHandler server-parsed .shtml .html .htm Options Indexes FollowSymLinks Includes
HelloWorld.html is just a single line:
When you browse to Trial.html, It responds with
Hello World , as I expected. Rename the file to Trial.php and navigate to that page and I get a blank screen (same code as Trial.html).
When I add the .php extension to the .htaccess file like this:
AddHandler server-parsed .shtml .html .htm .php Options Indexes FollowSymLinks Includes
and browse to Trial.php, I get a popup window saying "You have chosen to open 'Trial.php'", then asking whether I want to save the file or open it with a program on my local machine. I want to do neither. I want it to display "Hello World" in the browser. Does anyone see what I am doing wrong? When I remove line 3 from Trial.php (the
#include line), I get the same message.