• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Class 'Fpdf' not found

#1
[eluser]phparif[/eluser]
I create a class, that is in application/library/Fpdf.php . Now i want to extend "Fpdf" class ,i use the code:
class PdfTemplate extends Fpdf{
function __construct($orientation = 'P', $unit = 'mm', $size = 'A4') {
parent::__construct($orientation, $unit, $size);
}
}
PdfTemplate.php file is also same folder( application/library/PdfTemplate.php).
But it generate an error like
Fatal error: Class 'Fpdf' not found in C:\wamp\www\OnlineRegistrationSystem\application\libraries\PdfTemplate.php
Now how can i do this.

#2
[eluser]Mauricio de Abreu Antunes[/eluser]
You need to include your file.
PHP is not like Java or .NET. :-)

Code:
include 'file_name.php';

#3
[eluser]phparif[/eluser]
Thanks.......


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.