gpt4 book ai didi

linux - fpdf 1.81 与 php-7 在 linux 上运行

转载 作者:太空宇宙 更新时间:2023-11-04 12:25:10 26 4
gpt4 key购买 nike

我开发了一个应用程序,并且在 Windows 上生成 PDF 运行(运行)非常好。昨天我想在 Linux 上测试我的应用程序,我使用打开 PHP 7 的 Lamp。当我启动 PDF 的生成时,这里是我获得的消息:

**Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; FPDF has a deprecated constructor

Filename: php/fpdf.php

Line Num

错误:12**

有人可以帮助我吗?

谢谢

最佳答案

我想我得到了你的答案......

<?php
require('fpdf/fpdf.php');

// instead of "$doc = new PDF();" use "$doc = new FPDF();"

$doc = new FPDF('P', 'mm', array(100,150));
$doc -> AddPage();
$doc -> SetFont('Arial','B', 16);
$doc -> MultiCell(40,10, 'hello word!');
$doc -> OutPut('F', 'folio.pdf');

关于linux - fpdf 1.81 与 php-7 在 linux 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44947852/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com