
February 13th, 2004
05:46 PM
eval()'d code error??
hi could someone please help me with this error i keep getting
Parse error: parse error, expecting `'('' in /home/chippo/public_html/olli/inc/admin/ad_func.php(51) : eval()'d code on line 2
for some reason this only effects one php page. so if someone could help me. it would be very much appreciated

February 13th, 2004
06:51 PM
the function being called is...
<?php
function template($which)
{
global $acp;
$new = "class " . $which . "{\r";
$temp = $this->mysql->query("SELECT * FROM `" . $acp->ss['sql_prefix'] . "skin_templates` WHERE class = '$which'");
while($t = $this->mysql->fetch_row($temp)){
$new .= "function " . $t['func_name'] . "(" . $t['args'] . "){\n";
$new .= "global \$acp;\n";
$new .= "return <<<EOF\n";
$new .= $t['template'] . "\nEOF;\n\r}\n";
}
$new .= "}\n";
eval($new);
return new $which();
}
?>
and line 51 is