Buy Sell Discuss UK Domain Names at AcornDomains.co.uk domain name offers

Today's Drop Dates are: 07-11-2011 or 14-11-2011   All times are GMT. The time now is 04:11:57 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Website Design and Promotion > Website Design > Scripts and Coding
Connect with Facebook

Scripts and Coding PHP, MySQL, scripts

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 12-05-2008, 11:09:22 PM     #1 (permalink)
Administrator
 
admin's Avatar
 
Join Date: Jun 2004
Posts: 8,515
admin has disabled reputation

Script PHP include in a Smarty Template

Hi,

Does anyone know how to include a PHP file inside a Smarty template?

1, I create the PHP file, it works fine
2, Empty TPL file except for {include_php file="path and filename of PHP file"}

3, main page
Code:
<?
session_start();
 //includes
 require("includes/globals.php");
    //assign smarty variables
    $smarty->assign("page_title","title");
    $smarty->assign("page_content","TPL file with PHP include");
    $smarty->display("template.tpl");
?>
The page appears with the correct template but the PHP page content does not appear, instead I get the error:

Warning: Smarty error: pathandfilename.php is not readable in /home/name/public_html/smarty/libs/Smarty.class.php on line 1095

Any ideas anyone?

Thanks

Admin
admin is offline  
Old 13-05-2008, 06:37:26 AM     #2 (permalink)

 
Join Date: Oct 2005
Posts: 512
jonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond reputejonno has a reputation beyond repute

sure you are using the correct file path?

your include line should look like this:

{include_php file=$page_content}
jonno is offline  
Closed Thread



Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
review template (WP theme, html / php template) seanc Wordpress 2 20-06-2007 03:58:21 PM
Template - How Do You Value Yours? retired_member6 NameDrive 2 24-11-2006 02:29:28 PM
SSI or PHP include? purg Search Engine Optimisation 4 10-11-2006 08:44:57 PM

Domain Sponsor 2


All times are GMT. The time now is 04:11:57 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".