Jump to content

[SOLVED] [function.fopen]: failed to open stream... i use HTML2PDF


opencombatclan

Recommended Posts

hi all, i set up a site and i liked to test HTML2PDF, because i need it for a very important project.

But when i copied all files and made my test php and html files its not working!

i get:

Warning: fopen(doc.pdf) [function.fopen]: failed to open stream: Permission denied in /home/projects/domains/kunstnier.gethost.nl/public_html/phptest/fpdf.php on line 1687
FPDF error: Unable to create output file: doc.pdf

 

the phpprint.php file contains:

<?
require('html2fpdf.php');
$pdf=new HTML2FPDF();
$pdf->AddPage();
$fp = fopen("test.html","r");
$strContent = fread($fp, filesize("test.html"));
fclose($fp);
$pdf->WriteHTML($strContent);
$pdf->Output("doc.pdf");
echo "PDF file is generated successfully!";
?>

 

i tried to chmod everything thru ftp to 777, but without result.

i tried html2fpdf-3.0.1b and html2fpdf-3.0.2b, both did not work.

 

i have the file test.html in the same directory

<html>
<head>
<title>test</title>
</head>
<body>
<h1>TEST</h1>
</body>
</html>

 

So why i get this error?

please help me out.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.