Server Side Includes problem.
I apoligise in advance if this is in the wrong section.
I have an Apache server set up at home on my Window’s based PC. I have successfully got a server side includes to work using…
<!–#include virtual=”tbd.php” –>
This piece of coding is in a file called index.inc.php that is stored in…
home/ccdata/data
This file is called by the index.php page foud in…
home/
tbd.php is also located in home/
I hope that all makes sense.
So anyways, on my Windows PC, I have this working.
I uploaded these files to two Linux based hosting accounts I have with different companies and have the same problem on both. I’ve carried out a test to see what the problem is.
I’ve tested two simple php files.
tbd2.php is included in untitled.php using…
<!–#include virtual=”tbd2.php” –>
This did not work (also tried file=).
However, if I change this code to…
<?php include(“tbd2.php”); ?>
..it works. It does not matter what level the files are at…by adjusting the path it works.
With regard to my three files above….tbd2.php is included in the index.inc.php which is called by index.php…
the include does not display when I open up index.php in a broswer.
All the other page elements are visible….but where the tbd.php is supposed to be, there’s nothing.
I’ve spent two days on this and can’t see what the problem is. Clearly “includes” work on the two linux hosting accounts…so the problem must be to do with the way the includes is called upon by the index.php page, via index.inc.php on a Linux server. Yes…no? ?
Here’s the site…
[url]http://wwww.raizwan.co.uk/ll
The content contained in tbd.php should appear under the three images (Barbara speers, la bass and kekoo).
Here’s the untitled.php page…
[url]http://www.raizwan.co.uk/ll/untitled.php
This has two includes…
<?php include(“images/tbd2.php”); ?> – works.
<!–#include file=”images/tbd2.php” –> – doesn’t work.
Sorry for the long post…but any ideas?