我可以将以下$ _GET变量放入fpdf
//User Details
$Name = $_GET['name'];
$Surname = $_GET['surname'];
$City = $_GET['city'];
$CountryCode = $_GET['countrycode'];
$Phone = $_GET['phone'];
$Email = $_GET['email'];
<?php
include('includes/fpdf.php');
$Name = $_GET['name'];
$Surname = $_GET['surname'];
$City = $_GET['city'];
$CountryCode = $_GET['countrycode'];
$Phone = $_GET['phone'];
$Email = $_GET['email'];
class PDF extends FPDF
{
// Page header
function Header()
{
我需要在表单提交后创建一个pdf并让用户打印该文件。
答案 0 :(得分:0)
FPDF API似乎是一个完整的功能和特性库。
在这里编写如何使用所有功能将浪费时间,所以请在其他位置找到FPDF的文档。
以下是我发现的第一个看似富有成效的链接:
答案 1 :(得分:0)
我根本不熟悉fpdf,但在你的课程方法中,你会做类似的事情
$pdf = new PDF();
$pdf->someMethod($Name);
哪个会将$ Name变量传递给该方法
答案 2 :(得分:0)
include('includes/fpdf.php');
public $Name = "";
class PDF extends FPDF
{
function XYZ()
{
$this->Name = $_GET["name"];
}
}
This is the way of receiving the data in a class. But its more better if
you read the fpdf documentation, in which you can get more information
about generating the pdf.