简体   繁体   English

在joomla中找不到TCPDF类

[英]TCPDF class not found in joomla

I am using TCPDF to create pdf in joomla . 我正在使用TCPDFjoomla创建pdf。 I have include tcpdf.php using require_once and it is successfully included but when I am creating object of TCPDF class gives fatel error: TCPDF class not found ; 我已经使用require_once包含了tcpdf.php ,并且成功包含了它,但是当我创建TCPDF类的对象fatel error: TCPDF class not found ;fatel error: TCPDF class not found ;

Thanks 谢谢

You need to replace this code: 您需要替换以下代码:

require_once(JURI::root().'tcpdf/tcpdf.php');

with

require_once(JPATH_ROOT . '/tcpdf/tcpdf.php');

Open the tcpdf_include.php file and change the $tcpdf_include_dirs array values (line 30) as per your requirement or just directly include the tcpdf.php 根据您的要求打开tcpdf_include.php文件并更改$ tcpdf_include_dirs数组值(第30行),或者直接包含tcpdf.php

I did something like this and it working... 我做了这样的事情,它起作用了...

require_once('tcpdf.php')

my tcpdf_include.php and tcpdf.php files are in same folder. 我的tcpdf_include.php和tcpdf.php文件位于同一文件夹中。

hope this will help. 希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM