Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php][mysql] Generowanie pdf-ów, Serwer zwraca komunikat błędu
kaflo
post
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 11.03.2007

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


Warning: Cannot modify header information - headers already sent by (output started at /home/c/ce-www/public_html/serwis/index.php:10) in /home/c/ce-www/public_html/serwis/fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file

Po wygenerowaniu pliku zwracany jest powyższy błąd. Podejrzewam że wynika to z ustawień serwera wie ktoś może jak sobie poradzić z tym problemem?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
kaflo
post
Post #2





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 11.03.2007

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


no ale plik fpdf.php jest gotowy i nic w nim nie mieszalem. Po prostu pobrałem go ze strony fpdf.org i już.
  1. <?php
  2. switch($dest)
  3. {
  4. case 'I':
  5. //Send to standard output
  6. $this->Error('Some data has already been output, can't send PDF file');
  7. if(php_sapi_name()!='cli')
  8. {
  9. [b]//We send to a browser
  10. header('Content-Type: application/pdf');
  11. if(headers_sent())
  12. $this->Error('Some data has already been output to browser, can't send PDF file');
  13. [/b] header('Content-Length: '.strlen($this->buffer));
  14. header('Content-disposition: inline; filename="'.$name.'"');
  15. }
  16. echo $this->buffer;
  17. break;
  18. ?>
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 5.10.2025 - 02:16