Jump to content

Include custom PHP code


svens0n

Recommended Posts

Hi, I am experiencing problems including custom php code atm. I tried to include a script at the first line of the admin header.tpl. I use an absolute path to include the file, but it gives me an error:

 

{php}

ini_set('error_reporting',E_ALL);

ini_set('display_errors','1');

require('/home/user/abspath/custom.php');

{/php}

 

Fatal error: require(): Failed opening required '/home/user/abspath/custom.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/user/abspath//templates_c/%%52^525^525DC5F2%%header.tpl.php on line 8

 

What am I doing wrong? The rendered file has the absolutely right path in it.

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