My company had a decent website before I joined them, outsourced and untouched for years since. After joining I've been slowly improving it in my free-time.
This week I rewrote the header/left-column/footer which are the same on all pages so that I could include them using PHP and avoid fixing them one-by-one when I want to change something (among other benefits).
I'm not well-versed in messing with the .htaccess nor PHP but really all that I have changed is:
- Allowing PHP to work with .html files by adding to .htaccess:
AddType application/x-httpd-php5 .html .htm
- I changed:
<?xml version="1.0" encoding="UTF-8"?>
To:
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
";?>
To avoid the <?xml tag from throwing PHP short tag errors
- copy and pasted the three common elements, header, left-column, and footer into separate HTML files and and included them using:
<?php include '_header.html';?>
- changed the upper left text a little, but that shouldn't affect anything.
Looking at the source code after loading both pages (PHP include and plain html) they look identical. I haven't changed any of the CSS and so they are using the same code.
Yet for some reason switching to the PHP include version adds an empty line at the top of the page.
Here is the current (plain XHTML) version: http://www.akidc.co.jp/index.html The new file for reference is: ((removed outdated link)) (I can't change the .htaccess until I upload all the new pages at once or the <?xml tag will error them all so it's up'd as a .php)
The header file I'm including is at _header.html
Please help me solve the gap ^_^