usage of function dl() - loading extension at runtime

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ybi
Forum Newbie
Posts: 6
Joined: Thu Sep 11, 2003 9:28 am
Location: Germany

usage of function dl() - loading extension at runtime

Post by ybi »

hi everyone,

I like to use pdflib to create pdf documents dynamically. But my provider has not enabled pdf. Can I just put the lib somewhere in my web directory and load it with

Code: Select all

<?php
dl('somewhere_in_my_web_directory/php_pdf.dll');
?>
during runtime?

thanks for your help
ybi
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

This:
http://php.net/dl
explains the usage of dl().

Basically, you can't put the library into your webspace and use dl() to load it, plus your hosting provider may have disallowed the use of dl() in the php.ini:
http://php.net/manual/en/ref.info.php#ini.enable-dl

Mac
ybi
Forum Newbie
Posts: 6
Joined: Thu Sep 11, 2003 9:28 am
Location: Germany

Post by ybi »

hi twigletmac,

my provider has enabled the usage of dl(). And I' ve read the manual about the usage of dl() before I posted here, but I still wonder if there might be a way of using pdflib because it is very important for my project.
Or do you have any idea how to provide printable invoices to the customers of my project wich are in correct shape (A4) - no matter wich peferences the sytems of my customers have? I know that HTML with CSS offers this but there is no brower wich is capable of handle it yet. I thought of making images out of my customers invoices but don't know if I could do it with GD libary (enabled on the providers mashine,too)??

Do you have any idea??

many thanks for your help so far!

ybi
User avatar
Leviathan
Forum Commoner
Posts: 36
Joined: Tue Sep 23, 2003 7:00 pm
Location: Waterloo, ON (Currently in Vancouver, BC)

Post by Leviathan »

Could you perhaps talk to your provider about enabling pdflib? Most providers will likely do that, as it's probably a 5-minute process on their part and it keeps their customers happy.
ybi
Forum Newbie
Posts: 6
Joined: Thu Sep 11, 2003 9:28 am
Location: Germany

Post by ybi »

hi Leviathan,

maybe it's worth a try - thanks for your suggestion!

many greetings
ybi
Post Reply