Re: PDF Problem
| From: | Joerg Behrens | Date: | Fri, 29 Aug 2003 12:39:48 +0000 |
| Subject: | Re: PDF Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161129@lists.php.net to get a copy of this message | ||
"Jack" <nedcor4@nedcor.com.hk> schrieb im Newsbeitrag
news:20030829085238.3663.qmail@pb1.pair.com...
> Dear all
> I want to convert a text file to pdf format and store it in somewhere in
my
> harddisk.
> I had found out that there is a dll inside my php4.04 directory
> ("c:\php\extensions\php_pdf.dll") and from php.ini i had check that the
>
> extension_dir=c:\php\extensions;
> extension=php_pdf.dll had actived;
>
> now i obtained a simple script from the net, and tried to test it , but it
> return alot of errors!
>
> Here is the testing script :
> <?php
> dl("php_pdf.dll");
This is not needed because you already have load the extension in your
php.ini when used 'extension=php_pdf.dll'
$ext = 'pdf';
if(!extension_loaded($ext)){
// windowsstyle = php_gd[2].dll
// unix = gd.so
dl((strIstr(PHP_OS, 'win')) ? 'php_'.$ext.($ext == 'gd2' )? 2:
''.'.dll' :
$ext.'.so');
}
might be a solution. But keep in mind that dl() cant use when safe_mode is
on and when running a threaded webserver and mod_php under windows.
> Warning: Function registration failed - duplicate name -
> pdf_set_info_creator in C:\InetPub\wwwroot\Nedcor Internal
> Live\test\hello.php on line 2
This ever happens when you try to load a extension twice or when creating a
function wich already exists.
regards
Joerg