Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > pl.comp.lang.php > #14977

Re: FCKeditor i buforowanie ob_start, ob_get_contents

From koop <koop@o2.pl>
Newsgroups pl.comp.lang.php
Subject Re: FCKeditor i buforowanie ob_start, ob_get_contents
Date 2016-01-28 12:34 +0100
Organization ATMAN - ATM S.A.
Message-ID <n8cucg$gm1$1@node2.news.atman.pl> (permalink)
References <10a855bb-386c-4caa-8ebb-3880375a0cfd@googlegroups.com>

Show all headers | View raw


plik.txt to tekst czy taki przyklad?
include sluzy do dolaczenia plikow php
jezeli chcesz wgrac zawartosc pliku tekstowego to wywolaj fn np.
$content = file_get_content('plik.txt');

Pozdrawiam

W dniu 28.01.2016 11:51, web pisze:
> walczę z fckeditor. Przed PHP 5.3 działało dobrze, później przestało.
> 
> Wreszcie doszedłem, że przyczyna jest nieodpowiednie zachowanie buforowania ob_start(), ob_get_contents().
> 
> poniżej kod, który sprawia problemy
> 
> -----------------------------
> ob_start();
>  include("plik.txt");
> $content = ob_get_contents();
> ob_end_clean();
> 
> $oFCKeditor = new FCKeditor('EDYTOR') ;
> $oFCKeditor->BasePath = 'fckeditor/' ;
> $oFCKeditor->Height = '300' ;
> $oFCKeditor->width = '98%' ;
> $oFCKeditor->Value = $content ;
> $oFCKeditor->Create() ;
> ------------------------------------
> 
> 
> w PHP 5.3 i późniejsze  do $content nie chce wchodzić include(readfile tez nie, require też nie)
> 
> natomiast takie wyrazenie:
> 
> -------------------------
> ob_start();
> 
> echo "cos tam";
> 
>  // include("plik.txt");
> $content = ob_get_contents();
> ob_end_clean();
> 
> ------------------------
> 
> powoduje, ze "coś tam" pojawia się w $content.
> 
> PYTANIE!
> 
> Jak za pomocą include lub podobnej funkcji wrzucić zawartość pliku do $content, czyli ostatecznie wyświetlić w FCKEditor
> 
> z góry pieknie dziekuje za pomoc
> 
> 
> 
> 
> 
> 

Back to pl.comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

FCKeditor i buforowanie ob_start, ob_get_contents web <mirekgutowski@gmail.com> - 2016-01-28 02:51 -0800
  Re: FCKeditor i buforowanie ob_start, ob_get_contents koop <koop@o2.pl> - 2016-01-28 12:34 +0100
    Re: FCKeditor i buforowanie ob_start, ob_get_contents web <mirekgutowski@gmail.com> - 2016-01-28 04:25 -0800

csiph-web