我正在尝试使用FPDF创建pdf文件。一切都在localy工作正常,但一旦我把所有东西都移到服务器上它就不再工作了。 我收到以下错误消息: FPDF错误:某些数据已经输出,无法发送PDF文件(输出从/users/simplesystems/www/fpdf/pdf_rechnungen/Rechnungen.php:81开始)
这是上述路径中的代码
<?php
error_reporting(E_ALL);
include('rechnungenclass.php');
$rechnungen = new rechnungenclass();
$rechnungen->rechnungenausgeben();
$rechnungen->rechnungenhinzufuegen();
?>
我尝试删除所有的回声 - &gt;但仍然是同一个问题。 在当地完美运作。
你能帮帮我吗?
**更新 - &gt; Rechnungen.php的代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
<title>Rechnungen</title>
<!-- Bootstrap core CSS -->
<link href="../../navbar/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="../../navbar/navbar.css" rel="stylesheet">
<script src="../../navbar/assets/js/ie-emulation-modes-warning.js"></script>
</head>
<body>
<div class="container">
<!-- Static navbar -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">SimpleSystems</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="../../navbar/index.html">Home</a></li>
<li><a href="../../php/reisegruppe.php">Reisen</a></li>
<li><a href="../../php/teilnehmer.php">Teilnehmer</a></li>
<li class="active"><a href="Rechnungen.php">Rechnungen</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<!-- <li class="active"><a href="./">Default <span class="sr-only">(current)</span></a></li>
<li><a href="navbar-static-top">Static top</a></li>
<li><a href="navbar-fixed-top">Fixed top</a></li>-->
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
</nav>
<div class="jumbotron">
<h3> Rechnungen erfassen</h3>
<?php
ob_start();
require ('rechnungenclass.php');
$rechnungen = new rechnungenclass();
$rechnungen->rechnungenausgeben();
$rechnungen->rechnungenhinzufuegen();
ob_end_flush();
?>
<h3><u> Rechnungen hinzufuegen </u></h3>
<form method="post" action="">
<p><label>Rechnung Beschreibung:<br><input type="text" name="rechnungen_beschreibung"></label></p>
<p><label>Betrag:<br><input type="text" name="Betrag"></label></p>
<p><label>Reisegruppe ID:<br><input type="text" name="FK_reisegruppe_id"></label></p>
<input type="submit" name="form0" value=Hinzufuegen>
</form></br>
</body>
</html>