Includes Aren't Working - Help!

Doing a site for a client. On the previous host, the includes worked fine…now they don’t. I was using php includes, tried virtual includes. Still nothing.

Can someone please tell me the include tag…I did a search and tried the solutions but still nothing worked. Thanks!

If you’re trying to use Apache’s server-side includes for plain HTML document files, the extension should be shtml, ie


SSI test

The date and time:

Virtual include of URI:

--------------------[/code]On DreamHost servers, HTML documents aren't parsed for includes unless the extension is shtml or if you add a handler for a different extension in an .htaccess file.

Perhaps you can show us a testcase of what you’re trying to do? Have you checked the PHP documentation? Perhaps DreamHost is using a different version or configuration of PHP than the other host? Are you trying to get both Apache and PHP to parse for includes?

PHP include() function documentation
Apache Tutorial: Introduction to Server Side Includes