How to setup get_head(), get_foot(), and other files like wordpress uses

The Ripper

New Member
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 \[code\]get_file()\[/code\] function for loading files from my static content domain, But when I try to run it I get this:\[quote\] Parse error: syntax error, unexpected T_FUNCTION in /home/s0urc3/public_html/includes/functions.php on line 4\[/quote\]Here are the contents of my functions.php and my constants.php:functions.php\[code\]<?phpinclude('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)?>\[/code\]constants.php\[code\]<?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/")*/?>\[/code\]Any and all help would be much appreciated.
 
Back
Top