I'm currently working with Content Manager System and now suddenly browser blasts this weird error up to screen.
It says:
Parse error: syntax error, unexpected T_INC in /home/lukkarin/public_html/CMS/savepage.php on line 1
Here is my source:
<?php
$writedata = " ";
$i = 0;
while($i < $_POST['count']) {
$section = $_POST['section'.$i];
$writedata = $writedata."include('".$section."');";
i++;
}
$file = "./pages/".$_POST['page_n'];
$fh = fopen($file, "r");
$pagedata = fread($fh, filesize($file));
fclose($fh);
$pal1 = substr($pagedata, strpos($pagedata, "<!-- includestart -->") + 21, strpos($pagedata, "<!-- includestop -->") - (strpos($pagedata, "<!-- includestart -->")+21));
$writedata = str_replace($pal1, $writedata, $pagedata);
$file = "./pages/".$_POST['page_n'];
$fh = fopen($file, "w");
fwrite($fh, $writedata);
fclose($fh);
?>
Can somebody tell me what's the problem? Thank you.