I have built a php script that can sometimes have the server returns a 403 error message (forbidden access) because of the length and content of the data sent through the $_POST method. This 403 error message is returned because of some mod_secure rules that filtrate the data sent on the server.
Is it possible to have PHP handle this 403 error message?
For example, I would to catch the server status when I run my script and then display an error message when the server returns the 403 status code.
Is that even possible to do this in PHP?
In other words, without making a redirection, I would just like to display in the current page a custom message if the server returns a 403 status code when the PHP script itself is executed.
thanks for your help
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…