Solved

How do i find out using php if certain php functions are installed

Posted on 2008-06-25
3
213 Views
Last Modified: 2010-04-21
Hi

I'm writing a php program that I'm going to release as open source, I'm used to developing just for my company and have full access to the servers and configs so if anything is needed it simply gets installed.

In my code, is there any way I can check if certain extensions are running and advise the user if not? (such as php_xmlrpc.dll php_mysql.dll, )
0
Comment
Question by:Neil Thompson
3 Comments
 
LVL 24

Accepted Solution

by:
glcummins earned 400 total points
ID: 21869578
You should use the function_exists() function to check:

if (function_exists('myFunction'))
{
   // Call myFunction
   $result = myFunction();
}
0
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 100 total points
ID: 21869609
0
 
LVL 3

Author Closing Comment

by:Neil Thompson
ID: 31470747
Superb, damn easy when you ask the gurus!
Neil
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question