很多朋友在開發(fā)過程中發(fā)現(xiàn)現(xiàn)在新版iis7.5錯誤提示會直接顯示500錯誤,這就給開發(fā)帶來了困難,你一個php錯誤你根本無法找到位置,網(wǎng)上有很多教程,但是大部分都是不能用,讓iis顯示完整錯誤提示,只需要兩步,就可以
1、除了將php.ini配置為:
display_errors = on; error_reporting = E_ALL & ~E_NOTICE; |
2、還要再php網(wǎng)站的根目錄下面新建一個web.config文件:iis的配置, 注意你首先需要在你的網(wǎng)站根目錄添加web.config文件:代碼如下:
<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> |