SSI.php and .html

User 2206956 Photo


Registered User
45 posts

I would like to include some information about my discussion forum on my index.html page. I've notice that all the pages generated by CC have ".html". Can I rename this ".shtml" to be compatible with a SSI.php ?
User 122279 Photo


Senior Advisor
14,621 posts
Online Now

You sure can! :) But are you using SSI and PHP together? Never heard about that before. People normally use one or the other. And the file extension for SSI is .shtml, and for PHP it's .php.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 126492 Photo


Ambassador
1,525 posts

Depending on your Host Server setup, you can use php include without changing your page extension, meaning you can leave it at name.html.

This can be done by adding a small bit of code where you want the info to appear>;

<?php include ($_SERVER['DOCUMENT_ROOT'].'/inc/info.inc'); ?>


Where info.inc is the codiing for the info you want to use, it can be written in normal html format.

Most servers are now already setup to be able to do it this way, but if not, just contact your hosting support and I am sure they will enable it for you.
Jim
---------------------------

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.