how to handle a 403 error with PHP

后端 未结 2 490
天命终不由人
天命终不由人 2020-12-22 02:08

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 $_

2条回答
  •  太阳男子
    2020-12-22 02:45

    It would be to set up a custom error document for 403 errors in Apache, and point this at a script to handle the error. Refer to the ErrorDocument documentation on how to do this, but it would be something along these lines:

    ErrorDocument 403 /custom_403_handler.php
    

提交回复
热议问题