csehz
asked on
PHP code in index.html
Dear Experts,
I have a small php code which put to a html file, named as test.html and this works fine, including the file content of aside1.html in test.html.
The strange is that if I rename this test.html to index.html, somehow it does now work, not loading the file content. Do you have idea why? Simple the different file name can have such effect?
thanks,
I have a small php code which put to a html file, named as test.html and this works fine, including the file content of aside1.html in test.html.
The strange is that if I rename this test.html to index.html, somehow it does now work, not loading the file content. Do you have idea why? Simple the different file name can have such effect?
thanks,
<div id="aside1">
<?php
<!--#include file="aside1.html" -->
?>
</div>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much
ASKER
Just for me a conclusion to the future so if the file is
1) index.html - in that case this
<!--#include file="aside1.html" -->
is enough without any php tags.
2) index.php - in that case it works with
<?php
include('aside1.html');
?>
thanks,
1) index.html - in that case this
<!--#include file="aside1.html" -->
is enough without any php tags.
2) index.php - in that case it works with
<?php
include('aside1.html');
?>
thanks,
<!--#include file="aside1.html" -->
Yes. This is an html include, but will NOT process any PHP.
ASKER
Thanks just again
ASKER
thanks,