View Full Version : extending smarty class

08-24-2006, 08:04 PM
hi im trying to develop my own ecommerce site and im working from a book ive just started the project and using pear and smarty which ive never used before.

ive got and error message in this setup_smarty.php file

Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in c:\wamp\www\passport\include\setup_smarty.php on line 10
//reference smarty libary
require_once SMARTY_DIR.'Smarty.class.php';
//reference our configuration file
require_once 'config.inc.php';
//class that extends Smarty,used to process and display Smarty files
class Page extends Smarty
//call Smarty's constructor
//change the default template directories
ive gone through the code in the book and cant see any typos can anyone see what the problem is
many thanks magoo

08-25-2006, 12:22 AM

should be:

function __construct() {

if you're using PHP 5, or

function Page() {

with PHP 4