Home > Backend Development > PHP Problem > How to display errors in php under iis7

How to display errors in php under iis7

coldplay.xixi
Release: 2023-03-08 14:28:02
Original
1660 people have browsed it

How to display errors in PHP under iis7: First, under iis7, you need to configure PHP, the code is [display_errors = on]; then you need to add the [web.config] file in the root directory of the website, the code is [compilation] debug="true"..].

How to display errors in php under iis7

The operating environment of this tutorial: windows7 system, PHP5.6&&iis7 version, DELL G3 computer.

How to display errors in php under iis7:

In fact, we all know that setting php to display errors, 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;
Copy after login

iis configuration. Note that you first 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>
Copy after login

Related video recommendations: PHP video tutorial

The above is the detailed content of How to display errors in php under iis7. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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