this code is suppose to create a directory and a index.php file which will call another file which will inturn call a database to retrieve a template.
<?
$contents = ("<?
\$filename = '/home/supracore/public_html/smac/test1/setupfile.php';
\$fd = fopen (\$filename, 'r');
\$contents = fread (\$fd, filesize (\$filename));
fclose (\$fd);
\$contents = parse_file(\$contents);
eval ('?>$contents');
exit;
?>");
$fp = fopen("/home/supracore/public_html/smac/test1/$Formusername/index.php","w+");
chmod ("/home/supracore/public_html/smac/test1/$Formusername/index.php", 0777);
if ($fp)
{
fwrite($fp, $contents);
fclose($fp);
}
?>
right now I get a call to parse function error.
Can anyone help ?