"."/> ".">

Home  >  Article  >  Backend Development  >  How to display php error in iis

How to display php error in iis

藏色散人
藏色散人Original
2021-12-17 10:06:072322browse

iis method to display PHP errors: 1. Add the web.config file in the root directory of the website; 2. Set the code to "561085878ec176adf919ec562fac9a91".

How to display php error in iis

The operating environment of this article: Windows 7 system, PHP version 5.6, Dell G3 computer.

How does iis display PHP errors?

Under IIS7, PHP errors are displayed:

In fact, we all know the settings PHP displays an error, but under iis7/7.5, additional configuration is required.

First look at the configuration of php:

display_errors = on;
error_reporting = E_ALL & ~E_NOTICE;

iis configuration, please note that you first You need to add the web.config file in the root directory of your website:

The code is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
 
http://go.microsoft.com/fwlink/?LinkId=169433
 
  -->
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.webServer>
    <httpErrors errorMode="DetailedLocalOnly" existingResponse="PassThrough"></httpErrors>
  </system.webServer>
</configuration>

This is true Baidu experience dry stuff. .

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to display php error in iis. 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