In lib-custom.php I want to do this:
Text Formatted Code
if ($_SERVER['HTTP_HOST'] == 'urlforsite1') {
require_once ('c:/site-path/registrationcodeforsite1.php');
} else if ($_SERVER['HTTP_HOST'] == 'urlforsite2') {
require_once ('c:/site-path/registrationcodeforsite2.php');
}
I want to move the custom registration code from lib-custom.php into a file registrationcodeforsite1.php so it would contain this
Text Formatted Code
function custom_usercreate($uid) {
user create stuff unique for site1
}
function custom_userdisplay($uid) {
user display stuff unique for site1
}
function custom_useredit($uid) {
user edit stuff unique for site 1
}
I want to duplicate the custom registration stuff in a file registrationcodeforsite2.php so that it would contain something like this:
Text Formatted Code
function custom_usercreate($uid) {
user create stuff unique for site2
}
function custom_userdisplay($uid) {
user display stuff unique for site2
}
function custom_useredit($uid) {
user edit stuff unique for site 2
}
With this scheme, I can have completely different registrations being run by the same code.
Unfortunately, when I do the require_once above, the actual code in registrationcodeforsite1.php displays when I simply want it to load and be available for use.