问题
Is that possible and if it is, how to do that?
I'm asking because dl()
function is not available to me and because PHP team is abandoning this function from further versions.
Please do not answer "Use the Extension Loading Directives instead" - that is exactly the part which I do not understand how and I would like to/I'm asking about.
回答1:
The function has been removed from all SAPIs other than CLI and Embedded as of PHP 5.3. SAPIs are the interface between PHP and a web server / the CLI / etc.
It is no longer possible to load extensions at run-time in some cases. There are no other options available to you if you find your current SAPI does not support runtime extension loading.
If you need an extension loaded reliably, you should do so in the proper place in the system configuration. No amount of saying "that is not the answer I want" will change reality.
来源:https://stackoverflow.com/questions/13775990/dynamically-loading-php-exstension-without-dl-function