简体   繁体   中英

TCPDF class not found in joomla

I am using TCPDF to create pdf in joomla . 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 ;

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

I did something like this and it working...

require_once('tcpdf.php')

my tcpdf_include.php and tcpdf.php files are in same folder.

hope this will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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