/    Sign up×
Community /Pin to ProfileBookmark

Inclued Header Template

Hi all i have installed WHMCS in the same directory as my wordpress and i am trying integrate them. I actually pulled this off before but i completely forget what i done. I found some old files and what i had done before to make this work was i put the following into the header.tpl file of whmcs.

{php}
// including a php script directly from the template.
include(‘header-1.php’);
{/php}

I then created the file named header-1.php which i added the header code of the wordpress theme into it, but i also added the following

<?php
require(‘wp-blog-header.php’);
?>

If i open the header-1.php file directly on my browser it works fine. but when I add it to the header.tpl file of the whmcs and open the page i get the following.

Error establishing a database connection.

I seemed to have replicated what i have done before but this time im getting database connection errors. Has anyone any idea what iv done wrong this time. Any help would be great.

Thanks
Aiden

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @aiden857181 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...