ive already figured out how to create a new page with php code but i was wondering if there was any way to modify that code so that whenever a new page is created, it'll add my page template.
This is what i have so far:
<?php
$filename = 'test.txt';
$Content = "Add this to the file\r\n";
echo "open";
$handle = fopen($filename, 'x+');
echo " write";
fwrite($handle, $Content);
echo " close";
fclose($handle);
/*
if($handle = fopen($filename, 'a')){
if(is_writable($filename){
if(fwrite($handle, $content) === FALSE){
echo "Cannot write to file $filename";
exit;
}
echo "The file $filename was created and written successfully!";
fclose($handle);
}
else{
echo "The file $filename, could not written to!";
exit;
}
}
else{
echo "The file $filename, could not be created!";
exit;
}*/
?>
is there any way to maybe change the "$Content = "Add this to the file\r\n";" line to include my seperate template file