Jump to content

__construct in PHP5?


glennn.php

Recommended Posts

i'm using an older script which seems to be causing problems in PHP5...

 

 



class tpl_Magic
{
private $directory;
private $config;
private $templates = array();
private $variables = array();


public function __construct($directory)
{
	$this->directory = $directory;
	$this->templates['variables'] = array();
	$this->templates['tplfiles']  = array();
	$this->variables['names']     = array();
	$this->variables['values']    = array();
}

 

causing "unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' " at line 27... [ $this->directory = $directory; ]

 

is there anything i can do with this to make it work?

 

thanks

 

Link to comment
https://forums.phpfreaks.com/topic/189999-__construct-in-php5/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.