tcpdf_include.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. //============================================================+
  3. // File name : tcpdf_include.php
  4. // Begin : 2008-05-14
  5. // Last Update : 2013-05-14
  6. //
  7. // Description : Search and include the TCPDF library.
  8. //
  9. // Author: Nicola Asuni
  10. //
  11. // (c) Copyright:
  12. // Nicola Asuni
  13. // Tecnick.com LTD
  14. // www.tecnick.com
  15. // info@tecnick.com
  16. //============================================================+
  17. /**
  18. * Search and include the TCPDF library.
  19. * @package com.tecnick.tcpdf
  20. * @abstract TCPDF - Include the main class.
  21. * @author Nicola Asuni
  22. * @since 2013-05-14
  23. */
  24. // always load alternative config file for examples
  25. require_once('config/tcpdf_config_alt.php');
  26. // Include the main TCPDF library (search the library on the following directories).
  27. $tcpdf_include_dirs = array(realpath('../tcpdf.php'), '/usr/share/php/tcpdf/tcpdf.php', '/usr/share/tcpdf/tcpdf.php', '/usr/share/php-tcpdf/tcpdf.php', '/var/www/tcpdf/tcpdf.php', '/var/www/html/tcpdf/tcpdf.php', '/usr/local/apache2/htdocs/tcpdf/tcpdf.php');
  28. foreach ($tcpdf_include_dirs as $tcpdf_include_path) {
  29. if (@file_exists($tcpdf_include_path)) {
  30. require_once($tcpdf_include_path);
  31. break;
  32. }
  33. }
  34. //============================================================+
  35. // END OF FILE
  36. //============================================================+