Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> FCKeditor - zapisywanie do pliku?, Proszę pomóżcie :(
KomputeromaniaK
post
Post #1





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 10.01.2009

Ostrzeżenie: (0%)
-----


Chcę aby FCKeditor po kliknięciu przycisku, zapisywał mi dane do pliczku (a potem z niego czytał). Zrobiłem coś takiego, ale mam wielki problem.
Ale głównie chodzi o to, gdy załamię linię w pliku glowna.html to nie wyświetla się skrypt, wszystko musi być w jednej lini. A mój drugi skrypcik zapisuje wszystko tak jak się wyświetli...

Kod
    <form action="edit_index2.php" method="post">
        <script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = 'fckeditor/';    // 'fckeditor/' is the default value.
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples'));

var oFCKeditor = new FCKeditor( 'FCKeditor1' );
oFCKeditor.BasePath    = sBasePath = 'fckeditor/';
oFCKeditor.Height    = 500;
oFCKeditor.Value    = '<?php require_once('../../glowna.html'); ?>';
oFCKeditor.Create();
//-->
        </script>
        <br />
        <input type="submit" value="Submit" />
    </form>

Wyświetla się w nim FCKeditor. Za wyświetlanie w nim danych odpowiada to:
Kod
oFCKeditor.Value    = '<?php require_once('../../glowna.html'); ?>';

Czyta z pliku glowna.html

Ok wszystko dobrze gdy w pliku glowna.html kod jest zapisany tak:
Kod
<b>dasdasda</b>dfasdasda cos tam

ale gdy jest tak:
Kod
<b>dasdasda</b>
dfasdasda cos
tam

To nie wyświetla się edytor (na js sie w ogole nie znam o_O)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 15:04