You are here: problem - generate dynamic PDF files on the server « PHP Programming Language « IT news, forums, messages
problem - generate dynamic PDF files on the server

Posted by yanlu06 on 04/25/06 22:24

I tried to use HTML2FPDF to generate dynamic local files and save the
generated files on the server. I don't know why it gives me the
following error message:

" Warning: fopen(gen_pdf/gen_pdf/yan.pdf) [function.fopen]: failed to
open stream: No such file or directory in
/export/home/.../pdfCov/fpdf.php on line 1698
FPDF error: Unable to create output file: gen_pdf/yan.pdf "

I cut and paste the following part of the code into a test.php file and
run it. the test file can generate text file without any problem:

$name="testfile.pdf";
$handle = file_exists('gen_pdf/'.$name);
if (!$handle)
{
$f = fopen('gen_pdf/'.$name,'x+');
}
if(!$f) $this->Error('Unable to create output file: '.$name);
fwrite ($f,"testtest");
//fwrite($f,$this->buffer,strlen($this->buffer)); //this line is in
fpdf.php to generate pdf contents

fclose($f)

Anyone can help me out?

Thanks!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация