tags:

views:

569

answers:

4

i have found some pdf file geneartion program in php. When i reun it i get the following error Warning: require(/include/fpdf153/fpdf.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\aks\mikepdf.php on line 57

Fatal error: require() [function.require]: Failed opening required '/include/fpdf153/fpdf.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\aks\mikepdf.php on line 57

I think the fpdf.php is missin .I have searched on their site but i could not find the english version. can anyone provide me full link of english version?

A: 

I think that the file path that you have used with the require function is wrong

mck89
+2  A: 

Currently PHP is looking for the file in C:\include\fpdf153\fpdf.php as it is an absolute path.

Try to put the file in C:\xampp\htdocs\aks\include\fpdf153\ and use the follwing statement:

require(include/fpdf153/fpdf.php);

Then it uses a relative link based on your current working this (I guess it's C:\xampp\htdocs\aks\). And it should work.

You can find more info in the PHP manual

Silvan Mühlemann
A: 

I presume that the name of root folder is a test.

/test

copy font folder and fpdf.php into /test

Example, Create sample.php into /test folder.

<?php
require('fpdf.php');

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

I think the fpdf.php is missin .I have searched on their site but i could not find the english version. can anyone provide me full link of english version?

Are you looking for that?

http://www.fpdf.org/en/dl.php?v=16&amp;f=zip

Thinker