phpini生产与发展 [英] Php.ini production vs development

查看:88
本文介绍了phpini生产与发展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用XAMPP在本地主机上进行开发.我想删除PHP声明,并仅保留警告.我知道这是通过php.ini文件完成的,但是在查找它时遇到了麻烦.我遵循了phpinfo()中的路径,并且将其引导至/xampp/php.该文件夹中有两个php.ini文件:一个用于生产,一个用于开发.我已经将它们都设置为我想要的错误报告级别,但是我仍然收到通知,这使我相信这些控件都不能真正控制错误报告.我正在使用最新版本的XAMPP.所以我想我的问题是真正的php.ini在哪里,另外两个版本是什么?

I'm using XAMPP to develop on my localhost. I would like to remove the PHP notices and keep only the warnings. I know this is done through the php.ini file, however I'm having trouble locating it. I followed the path in phpinfo() and it led me to /xampp/php. Inside this folder are two php.ini files: one for production and one for development. I have set them both to the error reporting level I'd like, however I still receive notices which makes me believe that neither of these actually control error reporting. I'm using the latest version of XAMPP. So I guess my question is where is the true php.ini and what are these two other versions?

推荐答案

首先,请确保您要编辑的是php.ini,而不是php-development.iniphp-production.ini或其他任何内容,但 php.ini .之后,请确保重新启动Apache服务器,否则您的更改将不会生效.

First, make sure you're editing php.ini, not php-development.ini or php-production.ini or anything BUT php.ini. After that, ensure you restart your Apache server or your changes won't take effect.

此外,请查看 ini_set ,以在以下位置设置ini值:运行时.

Also, check out ini_set for setting ini values at runtime.

这篇关于phpini生产与发展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆