Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-24-2006, 07:04 PM   PM User | #1
magoo07
New to the CF scene

 
Join Date: Jul 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
magoo07 is an unknown quantity at this point
Question extending smarty class

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
<?php
//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
{
//constructor
function_construct()
{
//call Smarty's constructor
$this->Smarty();
//change the default template directories
$this->template_dir=TEMPLATE_DIR;
$this->compile_dir=COMPILE_DIR;
$this->config_dir=CONFIG_DIR;
}
}
?>
ive gone through the code in the book and cant see any typos can anyone see what the problem is
many thanks magoo
magoo07 is offline   Reply With Quote
Old 08-24-2006, 11:22 PM   PM User | #2
GJay
Senior Coder

 
Join Date: Sep 2005
Posts: 1,791
Thanks: 5
Thanked 36 Times in 35 Posts
GJay is on a distinguished road
PHP Code:
function_construct()

should be:
PHP Code:
function __construct() { 
if you're using PHP 5, or
PHP Code:
function Page() { 
with PHP 4
GJay is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:25 PM.


Advertisement
Log in to turn off these ads.