Hey Everyone,
Quick question. I have been using FCKeditor (http://www.fckeditor.net ) and I am trying to set it up so that when I go into the administration, I can type in anything I need to, and have it save to a txt file. However, our server is only running PHP 4.3.1 and it does not support some functions. All the permissions are set and stuff, so I don't understand why its not working. I am making a CMS, that will not require a MySQL database.. so yeah, thats why im not doing it that way... (I hope somebody will be able to help) I have pasted my code below:
<?php include('../includes/header.php')?>
<?php include('../includes/sidebar.php')?>
<td id="main_content">
<span class="heading_text">TxTCmS Administration</span><br /> <br />
<?php
include("../FCKeditor/fckeditor.php") ;
?>
<?php
$File = "../txt/grad.txt";
$Handle = fopen($File, 'w');
$Data = $body;
fwrite($Handle, $Data);
$Data = "$body";
fwrite($Handle, $Data);
fclose($Handle);
?>
<form method="post" action"fwrite">
<?php $oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '../FCKeditor/';
$oFCKeditor->Height = '350' ;
$oFCKeditor->Value = $body;
$oFCKeditor->Create() ;
?>
<input type="submit" name="submit" value="Save Page"></input>
</form></td>
</table>
<?php include('../includes/footer.php')?>