background image

php 模拟 post_验证页面的返回状态

主要文件,访问该页面,该页面根据

“验证页面”的返回结果设置本文件的返回状态

 

header('HTTP/1.1 '.$code.' '.$_status[$code])
代码如下

:

<?php
    ini_set('max_execution_time', 120); 
    include("CheckConfig.php");
    function send_http_status($code) {
        static $_status = array(
        // Informational 1xx
=> 'Continue',
=> 'Switching Protocols',
        // Success 2xx
=> 'OK',
=> 'Created',
=> 'Accepted',
=> 'Non-Authoritative Information',
=> 'No Content',
=> 'Reset Content',
=> 'Partial Content',
        // Redirection 3xx
=> 'Multiple Choices',
=> 'Moved Permanently',
=> 'Moved Temporarily ',  // 1.1
=> 'See Other',
=> 'Not Modified',
=> 'Use Proxy',
        // 306 is deprecated but reserved
=> 'Temporary Redirect',
        // Client Error 4xx
=> 'Bad Request',
=> 'Unauthorized',
=> 'Payment Required',
=> 'Forbidden',
=> 'Not Found',
=> 'Method Not Allowed',
=> 'Not Acceptable',
=> 'Proxy Authentication Required',
=> 'Request Timeout',
=> 'Conflict',
=> 'Gone',
=> 'Length Required',
=> 'Precondition Failed',