Ver Mensaje Individual
  #7 (permalink)  
Antiguo 24/06/2008, 07:58
Avatar de OsSk4R
OsSk4R
 
Fecha de Ingreso: octubre-2006
Ubicación: $this->home
Mensajes: 824
Antigüedad: 18 años, 4 meses
Puntos: 74
Respuesta: Escribir archivo con FckEditor

Saludos de nuevo,

Bueno, al final ya lo conseguí.
Sabia que debia utilizar fopen...pero el problema era en que no sabia como implementarlo...

Al final, encontré parte de un codigo que tenia por ahi que me creaba un archivo...y despues de probarlo varias veces, conseguí hacerlo.

Asi es como me ha quedado;

<?php
Código PHP:
include("FCKeditor/fckeditor.php") ;
include("config.php") ;
?>
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form action="editor.php" method="post">

<?

$Submit 
$_POST['Submit'];
$sub $_POST['sub'];


$fp fopen("terminos.php""w");
fwrite($fp'<?php
$terminos = "<fieldset><legend>$titulo_terminos</legend>' 
$sub '</fieldset>";

?>'
);
fclose($fp);
?>
<?php
    $formato 
'Basic';
    
$oFCKeditor = new FCKeditor('sub') ;  //
    
$oFCKeditor->BasePath 'fckeditor/';
    
$oFCKeditor->ToolbarSet $formato ;
    
$oFCKeditor->Width  '700' ;
    
$oFCKeditor->Height '500' ;
    
$oFCKeditor->Create() ;
?>
<br />
<table width="100%" border="0">
          <tr>
            <td width="64%"><div align="right">
                <input name="Submit" type="submit" class="formbutton" value="ENVIAR">
              </div></td>
            <td width="36%">&nbsp;</td>
          </tr>
        </table>
</form>
</body>
</html>
Saludos y gracias,