How to check for a php-extension?
| From: | Duncan | Date: | Thu, 04 Apr 2002 19:28:14 +0000 |
| Subject: | How to check for a php-extension? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-91586@lists.php.net to get a copy of this message | ||
Hi,
i wrote a script, which uses the IMAP-extension.
But if s.o. uses it on a machine, which doesn't support IMAP functions, i get an error message.
How can i prevent this error:
Fatal error: Call to undefined function: imap_open() in /home/test/public_html/test/imap_test.php on
line 8
and replace it with s.th. like:
"This function doesn't work, due to missing IMAP extension".
I already tried some stuff, but the problem is, that php exits the script as soon as it hits the
first IMAP related function.
Thanks for your help,
Duncan