TCPDF 模板 - 无法重新声明函数


TCPDF Template - Cannot redeclare function

并有一个模板来创建我想要的页面。
我有功能文本框($----和模板设置)

当我在创建页面后运行它时,当我在 cron 中使用它时,它只运行一次,然后在 php 中出现这样的错误

致命错误:无法在第 12 行的 pdf.tpl 中重新声明 TextBox()(之前在 pdf.tpl:7 中声明)

这是我在第 7-13 行的代码

function TextBox($pdf,$textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 8, $fontstyle = '', $align = 'L',$ltr='',$fil='') {
    $pdf->SetXY($x+15, $y); // 20 = margin left
    $pdf->SetFont('freesans', $fontstyle, $fontsize);
    $pdf->Cell($width, $height, $textval,$ltr,false , $align,$fil);
}
$startpage = $pdf->GetPage();

TextBox 是 TCPDF 也使用的函数名称。选择另一个。