Non funge uguale....
Non riesco davvero a capire...con php4 funziona da favola ma con il php5 nisba....
Questa è la function PARSE :
[php]// ************************************************************
// The meat of the whole class. The magic happens here.
function parse ( $ReturnVar, $FileTags )
{
$append = false;
$this->LAST = $ReturnVar;
$this->HANDLE[$ReturnVar] = 1;
if (gettype($FileTags) == "array")
{
unset($this->$ReturnVar); // Clear any previous data
while ( list ( $key , $val ) = each ( $FileTags ) )
{
if ( (!isset($this->$val)) || (empty($this->$val)) )
{
$this->LOADED["$val"] = 1;
if(isset($this->DYNAMIC["$val"]))
{
$this->parse_dynamic($val,$ReturnVar);
}
else
{
$fileName = $this->FILELIST["$val"];
$this->$val = $this->get_template($fileName);
}
}
// Array context implies overwrite
$this->$ReturnVar = $this->parse_template($this->$val,$this->PARSEVARS);
// For recursive calls.
$this->assign( array( $ReturnVar => $this->$ReturnVar ) );
}
} // end if FileTags is array()
else
{
// FileTags is not an array
$val = $FileTags;
if( (substr($val,0,1)) == '.' )
{
// Append this template to a previous ReturnVar
$append = true;
$val = substr($val,1);
}
if ( (!isset($this->$val)) || (empty($this->$val)) )
{
$this->LOADED["$val"] = 1;
if(isset($this->DYNAMIC["$val"]))
{
$this->parse_dynamic($val,$ReturnVar);
}
else
{
$fileName = $this->FILELIST["$val"];
$this->$val = $this->get_template($fileName);
}
}
if($append)
{
$this->$ReturnVar .= $this->parse_template($this->$val,$this->PARSEVARS);
}
else
{
$this->$ReturnVar = $this->parse_template($this->$val,$this->PARSEVARS);
}
// For recursive calls.
$this->assign(array( $ReturnVar => $this->$ReturnVar) );
}
return;
} // End parse()
// ************************************************************[/php]
x