Home  >  Article  >  Backend Development  >  How to enable php error prompts under mac

How to enable php error prompts under mac

藏色散人
藏色散人Original
2020-07-29 10:01:422575browse

How to open mac php errors: First open the "php.ini" file; then modify the content to "display_errors = On"; then select the Log errors option of mamp pro; and finally select "to_screen".

How to enable php error prompts under mac

Recommended: "PHP Tutorial"

Enable php error reminder in mamp environment under MAC

1. The first step is to modify the php.ini file: open the /Applications/MAMP/bin/php/{your PHP version}/conf/php.ini file

Find display_errors = Off ( About line 277), change display_errors = On and find error_reporting = E_ALL (about line 270, there are 3 value types, set according to your own needs)

2. Set the Log errors option of mamp pro in two steps:

How to enable php error prompts under mac

Main Window->php->Log errors and select to_screen , so that errors will be prompted on the browser

After setting is completed, restart the service.

The above is the detailed content of How to enable php error prompts under mac. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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