dongmeng2687 2017-02-08 10:08 采纳率: 0%
浏览 71
已采纳

带有消息'FPDF错误PHP的未捕获异常'异常'

I was developing this website which at some point, exports a PDF with some appointment details. It worked properly, but a few days ago it trowed me this error, and so far I couldn't figure out why. Thanks in advance!

Complete error:

Fatal error: Uncaught exception 'Exception' with message 'FPDF error: Some data has already been output, can't send PDF file (output started at /home/r46122expe/public_html/Domenii/wise-company.com/testprefectura/inf_permise/Rezervari/pdf.php:2)' in /home/r46122expe/public_html/Domenii/wise-company.com/testprefectura/inf_permise/Rezervari/fpdf.php:271 Stack trace: #0 /home/r46122expe/public_html/Domenii/wise-company.com/testprefectura/inf_permise/Rezervari/fpdf.php(1052): FPDF->Error('Some data has a...') #1 /home/r46122expe/public_html/Domenii/wise-company.com/testprefectura/inf_permise/Rezervari/fpdf.php(1012): FPDF->_checkoutput() #2 /home/r46122expe/public_html/Domenii/wise-company.com/testprefectura/inf_permise/Rezervari/pdf.php(123): FPDF->Output('D', 'programare.pdf') #3 {main} thrown in /home/r46122expe/public_html/Domenii/wise-company.com/testprefectura/inf_permise/Rezervari/fpdf.php on line 271

fpdf.php

http://pastebin.com/DfaSFCY2

  • 写回答

1条回答 默认 最新

  • dozxos6346 2017-02-08 10:38
    关注

    output started at /home/r46122expe/public_html/Domenii/wise-company.com/testprefectura/inf_permise/Rezervari/pdf.php:2

    So you need to check this script and not FPDF. You may have white spaces at the beginning of your file or a BOM.

    If you code in UTF-8 make sure that you re-save your file without BOM and make sure that your open php-tag is located at the first byte without any leading white spaces.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?