tcpdf_include.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. //============================================================+
  3. // File name : tcpdf_include.php
  4. // Begin : 2008-05-14
  5. // Last Update : 2014-12-10
  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(
  28. realpath(dirname(__FILE__) . '/../tcpdf.php'),// True source file
  29. realpath('../tcpdf.php'),// Relative from $PWD
  30. '/usr/share/php/tcpdf/tcpdf.php',
  31. '/usr/share/tcpdf/tcpdf.php',
  32. '/usr/share/php-tcpdf/tcpdf.php',
  33. '/var/www/tcpdf/tcpdf.php',
  34. '/var/www/html/tcpdf/tcpdf.php',
  35. '/usr/local/apache2/htdocs/tcpdf/tcpdf.php'
  36. );
  37. foreach ($tcpdf_include_dirs as $tcpdf_include_path) {
  38. if (@file_exists($tcpdf_include_path)) {
  39. require_once($tcpdf_include_path);
  40. break;
  41. }
  42. }
  43. //============================================================+
  44. // END OF FILE
  45. //============================================================+