dongtan6206 2017-01-24 08:09
浏览 184

Yii2:我可以在我的Yii2-advanced-app中添加ini_set的正确位置在哪里?

I've an application in my Apache local Server and using Yii2-advanced-app. I need to edit my php.ini to support my project, I need to change precision=14 become precision=20. I'm affraid that change will affect all application in my local server. I've read some issue, and they said I can add ini_set('precision', '20'); in my current application, so that change will only affect the current application.

In some issue they said in Yii2-basic-app you can add that in web.php, under use statement. I think that file in Yii2-advanced-app equal to /config/main.php. I didn't found any use statement there, and I also have add the ini_set in there and I got nothing.

Where is the right place I can add this ini_set code in my current application?

  • 写回答

1条回答 默认 最新

  • dongxing8650 2017-01-24 11:48
    关注

    The easiest way is to use '.user.ini' in your public directory.

    Example of .user.ini:

    precision = 20
    memory_limit = 768M
    post_max_size = 68M
    
    评论

报告相同问题?

悬赏问题

  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据