$mainn = fopen($main.inc, \"r\")))
is giving you problems, most likely..
$main.inc? if the file name is in $main, then try fopen(\"$main.inc\", \'r\')
if(!$mainn = fopen(\"$main.inc\", \'r)){
print \'Error: $mainn could not be read<br>\';
}
while(!feof($mainn)){
print str_replace(\"\r\",\'\',fgets($mainn, 255));
}
fclose($mainn);
this should work.
there\'s a file content-dumping function...but this\'ll save you some ram, if it\'s run a lot..
-blake