News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
How to Handle Unloaded PHP Extensions at Runtime
March 26, 2010 @ 09:10:13

On the SitePoint PHP blog today Craig Buckler has a suggestion on how to handle unloaded extensions in your application in case you need to define a failover.

Unless you're creating very simple applications, you will soon require one or more PHP extensions. Extensions are code libraries which extend the core functionality of the language. [...] What happens when you want to move your web application to another host or platform where a different set of extensions are configured?

Using the extension_loaded function built into PHP, you can create intelligent code that can fall back on a different technology if needed. In his example its trying to check for the GD graphics extension and echoing and error message if it's not found. The function_exists function can be used similarly.

0 comments voice your opinion now!
extension runtime functionexists extensionexists tutorial


blog comments powered by Disqus

Similar Posts

MaltBlue.com: Zend Framework 2 Modules - The Application's Heart

Crynobone\'s Blog: Creating our own RSS Aggregators

ProDevTips.com: Extending PHP Doctrine Record - Check Box Groups

Bob Majdak's Blog: Compile That PHP-GTK2, and More

Developer.com: SQLite: The Sensible Database Solution


Community Events

Don't see your event here?
Let us know!


example opinion api install interview extension library laravel5 community language framework unittest podcast release voicesoftheelephpant series xdebug php7 laravel introduction

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework