1
I have a file called error.php
, he takes the value GET or an already defined variable and display errors in multiple languages and of all types.
I use IIS and have tried on Web.config to use PHP pages, but I did not succeed, I can only with HTML pages that is not my purpose.
How can I use the.php error file as an error page in Web.config?
Current web.config:
<?xml version="1.0" encoding="UTF-8">
<configuration>
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="401" />
<error statusCode="401" path="sys\error\401.html responseMode="File" />
.....
</httpErrors>
</system.webServer>
</configuration>
And I tried to use it this way, but it didn’t work:
<error statusCode="401" path="sys\error.php?number=401" responseMode="File" />
People excuse how the question is, I did the phone but I could not get as wanted...and now to edit it bugged all the text... I AM FIXING!
– user45722
Almost certain the formation, needs the 4 spaces and also skip a line to separate. For example after the
web.config atual:
enter :)– rray
Didn’t work as? Appeared the default page is this? or appeared another error?
– Guilherme Nascimento