Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7622793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:32:33+00:00 2026-05-31T04:32:33+00:00

I need to display some external data from php file to .tpl file. For

  • 0

I need to display some external data from php file to .tpl file. For this I want to include php file to .tpl file. I have tried folllowing code to display php file content to tpl.

{php} include('custom_code.php'); {/php}

but on page output was include('custom_code.php');

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:32:35+00:00Added an answer on May 31, 2026 at 4:32 am

    {php} has been deprecated. Have a look at Extending Smarty With Plugins.

    put the follwing in …/plugins/function.yourplugin.php:

    <?php
    function smarty_function_yourplugin(array $params, Smarty_Template_Instance) {
        include 'your_other_file.php';
    }
    

    and use in your template:

    {yourplugin}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to display some details on DetailsView from two tables. I have table:
i need to display some data from the DB. I need to display the
Hi I need to create a module in drupal to display some data, not
I have a wxPython application that relies on an external config file. I want
I have a use case , where I need to display some log files
I need to display some tabular data in a JSF page. I need some
I need to display some content within an area that will have rounded corners.
I have an external database that obviously is storing some data. I am setting
I have some pages that display book informations, and they use an external cover
I have a image centered on the screen. I need to display some text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.