Create Class Help

require(‘c:\FPDF\fpdf.php’);

class PDF extends FPDF
{
// Cabecera de p?gina
function Header()
{
// Logo
$this->Image(‘logo_pb.png’,10,8,33);
// Arial bold 15
$this->SetFont(‘Arial’,‘B’,15);
// Movernos a la derecha
$this->Cell(80);
// T?tulo
$this->Cell(30,10,‘Title’,1,0,‘C’);
// Salto de l?nea
$this->Ln(20);
}

// Pie de p?gina
function Footer()
{
// Posici?n: a 1,5 cm del final
$this->SetY(-15);
// Arial italic 8
$this->SetFont(‘Arial’,‘I’,8);
// N?mero de p?gina
$this->Cell(0,10,‘Page ‘.$this->PageNo().’/{nb}’,0,0,‘C’);
}
}

// Creaci?n del objeto de la clase heredada
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont(‘Times’,’’,12);
for($i=1;$i<=4;$i++)
$pdf->Cell(0,10,'Imprimiendo l?nea n?mero '.$i,0,1);
$pdf->Output();

I have a Application type Blank, when eject the application show me :
Fatal error: Class declarations may not be nested in C:\Program Files\NetMake\v7\wwwroot\scriptcase\app\reporteGastos\blank\index.php on line 919

are where define my class ??

You can do that in a librarie for instance. But more important you are creating a class of name PDF. Now I’m not sure, but if SC is using the same class name you might run into conflicts. As fpdf is part of the sc librarie the declaration (require) might not be necessary. But to prevent double inclusion you might try require_once. Just things to try I guess.

I made a step by step how to solve it!

http://www.scriptcase.net/forum/showthread.php?4933-Help-with-Report-PDF/page2&highlight=FPDF

I want help for some classes Lets see them, tell me what all your custom classes are. 10 Points to the 5 i like best. Heres how you do

Lets see them, tell me what all your custom classes are. 10 Points to the 5 i like best. Hermes how you do