I am trying to migrate my site to PHP and use a WP theme on my site with out modifying the theme too much. So my problem is that I want to create a functions.php file like in Wordpress that contains some code that can be called to load the header and footer of my sites theme from each page. Also I want to keep some constants in another file that will be used in my site for loading files from my sub-domains, getting the current year, etc. I have a basic get_file()
function for loading files from my static content domain, But when I try to run it I get this:
Parse error: syntax error, unexpected T_FUNCTION in /home/s0urc3/public_html/includes/functions.php on line 4
Here are the contents of my functions.php and my constants.php:
functions.php
<?php
include('constants.php')
/*Gets a file from the domain http://files01.s0urc3.ismywebsite.com/*/
function get_file($file)
{
FILE_ROOT + $file
}
get_file(images/bg.jpg)
?>
constants.php
<?php
/* CONSTANTS*/
define(FILE_ROOT, "http://files01.s0urc3.ismywebsite.com/")
define(HOME, "http://s0urc3.ismywebsite.com/")
define(BLOG_HOME, "http://blog.s0urc3.ismywebsite.com/")
define(FORUMS_HOME, "http://forums.s0urc3.ismywebsite.com/")
define(YEAR, getdate(year))
/*define(FILE_ROOT, "http://files01.s0urc3.ismywebsite.com/")*/
?>
Any and all help would be much appreciated.