mac os 下的 mamp 如何开启php的错误报告?

WBOY
Release: 2016-06-06 20:43:15
Original
1433 people have browsed it

我在mac os 下用mamp 开发,写的错误代码都不报错的。

<code>php.ini 设置了 error_reporting=E_ALL;
</code>
Copy after login
Copy after login

代码中加

<code>error_reporting(E_ALL); ini_set('display_errors', '1'); 
</code>
Copy after login
Copy after login

还是不行。。

回复内容:

我在mac os 下用mamp 开发,写的错误代码都不报错的。

<code>php.ini 设置了 error_reporting=E_ALL;
</code>
Copy after login
Copy after login

代码中加

<code>error_reporting(E_ALL); ini_set('display_errors', '1'); 
</code>
Copy after login
Copy after login

还是不行。。

打开 /Applications/MAMP/bin/php/{your PHP version}/conf/php.ini 文件

找到 display_errors = Off (大概在 277 行的位置)把他改成 display_errors = On

尝试下以下操作
Main Window->php->Log errors [checkbox]to_screen

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template