Jump to content

can't include php in tpl


rev

Recommended Posts

Hi

 

In something.php (whmcs root) i have

<? echo "i love cookies" ?>

In header.tpl (templates/default) i have

{include_php file="../../something.php"}

Now on every page of whmcs i should have "i love cookies" on top but it's not so.

 

Why?

 

p.s. My templates_c is empty

Link to comment
Share on other sites

Try giving the include_php statement the absolute path to something.php.

 

Not sure about the include _php command. But may require single quotes.

 

Also, probably just an oversight in your example. But requires a ; to end the php line.

 

HTH's

-Roger

Link to comment
Share on other sites

Tried the following:

 

{include_php file="/var/www/vhosts/mywebsite.com/subdomains/clientarea/httpdocs/something.php";}

 

{include_php file='/var/www/vhosts/mywebsite.com/subdomains/clientarea/httpdocs/something.php';}

 

With no success

Edited by rev
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated