简体   繁体   中英

How to enable php extension intl programmatically

I have to convert the amount in words in Yii2. I used

Yii::$app->formatter->asSpellout('125');

to convert. I have enabled intl extension in the php.ini file. The same thing I want to use in the server too. Is there any way to enable the intl extension via code?

If you have enabled the extension in php.ini it is available to you on your server. If by server you mean a different server (you local PC is also a server in this case), you cannot enable extension programmatically and will have to contact your hosting provider for the same.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM