Determining if a PHP function is available
You can determine whether or not a PHP function is enabled for your web site by using the function_exists() function. To determine if a function is available, follow these steps:- Create a file that contains the following code. This sample code checks to see if the fsockopen() function is available. To check for another function, change the $function_name variable’s value:
- Save the file as function.php or something similar.
- Upload the file to your public_html directory.
- Use your browser to go to http://example.com/function.php, where example.com represents your web site’s domain name. The page displays whether or not the function is enabled for your web site.