How to include Php file

How to include Php file

Postby Chris » Mon May 17, 2010 2:24 pm

I have gathered few products data dynamically (not amazon or ebay) and process it through 2 PHP programs. I would like to display the data in sidebar and in Home page. How do i include these PHP files. Never worked with TPL files. i called the php include function in TPL, and it is displaying the include function not the actual data. Can you help me with this?
Chris

 
Posts: 149
Joined: Wed Mar 03, 2010 4:00 am

Re: How to include Php file

Postby ravikum » Mon May 17, 2010 3:05 pm

PHP may not work inside tpl files.
You can use html iframe code to display your data.

you can upload your products data file into server and then, use the iframe code to display that data in the side bar.

I know that it is not the best solution like php include. But it is an alternative.
Last edited by ravikum on Fri May 21, 2010 4:53 am, edited 1 time in total.
ravikum

 
Posts: 21
Joined: Sat May 15, 2010 7:47 am

Re: How to include Php file

Postby Chris » Fri May 21, 2010 4:30 am

But just wanted to check with admin to see whether any options open in ANS for custom php code.
Chris

 
Posts: 149
Joined: Wed Mar 03, 2010 4:00 am

Re: How to include Php file

Postby ravikum » Tue May 25, 2010 3:19 pm

Hi,
Have you tried like this ?

Code: Select all
<?php include "filename.php"; ?>
ravikum

 
Posts: 21
Joined: Sat May 15, 2010 7:47 am

Re: How to include Php file

Postby Chris » Wed May 26, 2010 1:09 pm

admin, any idea on this?
Chris

 
Posts: 149
Joined: Wed Mar 03, 2010 4:00 am

Re: How to include Php file

Postby admin » Sat May 29, 2010 2:24 pm

it should work as ravikum has described. any PHP can be used in tpl files just as long as it is wrapped in the usual php tags.
User avatar
admin
Site Admin
 
Posts: 462
Joined: Sun Nov 22, 2009 7:24 pm


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron