I'm teaching myself website development and taught myself php and html. When I originally started this, I designed my website on apache running on windows xp. Once I got a majority of the bugs worked out, I loaded it onto a free server hosting site and everything was hunky dory.
Unfortunately, windows died (corrupted file in my system32 folder) and I'm now running Linux Mint. I just installed apache2, php, and mysql onto it so I can continue my website development, but here is the problem:
To save time, I have php include my header and footer html files using an include statement like so:
<?php include("./dir/file1.html");?>
This worked for both windows and the free server (which I believe is running a version of Linux, but don't quote me on that). However, it's not working on my machine anymore. This works:
<?php include("./file2.html");?>
but I'd really not like to refracter every webpage that I have. How can I get my include statements to include files in folders in relative paths again?
Things I have tried:
I've change the include_path to point to dir, to no avail.
I've tried absolute paths, but that didn't work either.
I've sifted through both apache.conf and php.ini looking for anything that might prevent it from reading.
Double checked the folder and file permissions to make sure it can be read.
Any and all advice will be appreciated, many thanks in advance.
UPDATE
using require gives me the error:
The website encountered an error while retrieving http://localhost/. It may be down for maintenance or configured incorrectly.
Which is not very helpful.
There are no errors using just the include statement.
There is a ".:" in my include_path.
Final Update
After a lot of trial and error, I've concluded that the problem doesn't involve php or the include statement at all, but rather with the apache server not allowing access to sub directories for some reason. This question is now moot and should be closed.