Welcome Guest, Not a member yet? Register   Sign In
Include Path Error In FPDF
#1

[eluser]rochellecanale[/eluser]
hey guys I am generating a PDF file out of FPDF library. just want to ask what is my error in my code below this is my sample code:

Code:
<?php
include('/fpdf/fpdf.php');

    $pdf = new FPDF();
    $pdf->AddPage();
    $pdf->SetFont('Arial','B',16);
    $pdf->Cell(40,10,'Hello World!!');
    $pdf->Ln();
    $pdf->Output();
?>

because when I attempt to run this code in my view it shows

Code:
Fatal error: require(): Failed opening required 'http://localhost/eMLM/fpdf/fpdf.php' (include_path='.;C:\\\\\\\\xampp\\\\\\\\php\\\\\\\\PEAR') in C:\xampp\htdocs\eMLM\application\views\sites\datepdf.php on line 3

Where should i put the file of fpdf? Inside my folder which is eMLM or inside of htdocs? I cant' get the path. Help me guys. But when i try to create a seperate folder that contains a pdf file test.pdf it shows the PDF file. By the way I also tried full path and relative path but it always shows the error above.
#2

[eluser]kreamik[/eluser]
cannot help you but i can give you an idea :
since TCPDF is successor for FPDF i suggest you to use TCPDF since it fully support for PHP5,

you can start here :
hxxp://modije.in/blog/?p=14




Theme © iAndrew 2016 - Forum software by © MyBB