{"id":972,"date":"2019-08-15T17:30:31","date_gmt":"2019-08-15T09:30:31","guid":{"rendered":"https:\/\/wyxxt.org.cn\/?p=972"},"modified":"2023-12-04T16:42:22","modified_gmt":"2023-12-04T08:42:22","slug":"codeigniter3-%e5%85%ac%e5%85%b1%e5%87%bd%e6%95%b0common-php","status":"publish","type":"post","link":"https:\/\/wyxxt.org.cn\/?p=972","title":{"rendered":"CodeIgniter(3)\u2014\u2014\u516c\u5171\u51fd\u6570Common.php"},"content":{"rendered":"<h3>1.\u6982\u8ff0<\/h3>\n<p>Common\u4e2d\u58f0\u660e\u4e86\u5f88\u591a\u5e38\u7528\u64cd\u4f5c\u7684\u529f\u80fd\u51fd\u6570\uff0c\u5728CodeIgniter.php\u4e2d\u52a0\u8f7d\u4e86Common.php\uff0c\u6240\u4ee5\u8fd9\u4e2a\u6587\u4ef6\u662f\u5168\u5c40\u8c03\u7528\u7684<\/p>\n<h3>2.\u8be6\u60c5\u7b80\u4ecb<\/h3>\n<p>is_php:\u5224\u65adphp\u7248\u672c<\/p>\n<pre><code class=\"language-php line-numbers\">function is_php($version)\n    {\n        static $_is_php;\n        $version = (string) $version;\n\n        if ( ! isset($_is_php[$version]))\n        {\n            $_is_php[$version] = version_compare(PHP_VERSION, $version, '&gt;=');\n        }\n\n        return $_is_php[$version];\n    }\n}\n<\/code><\/pre>\n<p>is_reqlly_writeable:\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u662f\u5426\u53ef\u5199<\/p>\n<pre><code class=\"language-php line-numbers\">function is_really_writable($file)\n    {\n        \/\/ If we're on a Unix server with safe_mode off we call is_writable\n        if (DIRECTORY_SEPARATOR === '\/' &amp;&amp; (is_php('5.4') OR ! ini_get('safe_mode')))\n        {\n            return is_writable($file);\n        }\n\n        \/* For Windows servers and safe_mode \"on\" installations we'll actually\n         * write a file then read it. Bah...\n         *\/\n        if (is_dir($file))\n        {\n            $file = rtrim($file, '\/').'\/'.md5(mt_rand());\n            if (($fp = @fopen($file, 'ab')) === FALSE)\n            {\n                return FALSE;\n            }\n\n            fclose($fp);\n            @chmod($file, 0777);\n            @unlink($file);\n            return TRUE;\n        }\n        elseif ( ! is_file($file) OR ($fp = @fopen($file, 'ab')) === FALSE)\n        {\n            return FALSE;\n        }\n\n        fclose($fp);\n        return TRUE;\n    }\n<\/code><\/pre>\n<p>&amp;load_class:\u52a0\u8f7d\u7c7b<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Class registry\n     *\n     * This function acts as a singleton. If the requested class does not\n     * exist it is instantiated and set to a static variable. If it has\n     * previously been instantiated the variable is returned.\n     *\n     * @param   string  the class name being requested\n     * @param   string  the directory where the class should be found\n     * @param   mixed   an optional argument to pass to the class constructor\n     * @return  object\n     *\/\n    function &amp;load_class($class, $directory = 'libraries', $param = NULL)\n    {\n        static $_classes = array();\n\n        \/\/ Does the class exist? If so, we're done...\n        if (isset($_classes[$class]))\n        {\n            return $_classes[$class];\n        }\n\n        $name = FALSE;\n\n        \/\/ Look for the class first in the local application\/libraries folder\n        \/\/ then in the native system\/libraries folder\n        foreach (array(APPPATH, BASEPATH) as $path)\n        {\n            if (file_exists($path.$directory.'\/'.$class.'.php'))\n            {\n                $name = 'CI_'.$class;\n\n                if (class_exists($name, FALSE) === FALSE)\n                {\n                    require_once($path.$directory.'\/'.$class.'.php');\n                }\n\n                break;\n            }\n        }\n\n        \/\/ Is the request a class extension? If so we load it too\n        if (file_exists(APPPATH.$directory.'\/'.config_item('subclass_prefix').$class.'.php'))\n        {\n            $name = config_item('subclass_prefix').$class;\n\n            if (class_exists($name, FALSE) === FALSE)\n            {\n                require_once(APPPATH.$directory.'\/'.$name.'.php');\n            }\n        }\n\n        \/\/ Did we find the class?\n        if ($name === FALSE)\n        {\n            \/\/ Note: We use exit() rather than show_error() in order to avoid a\n            \/\/ self-referencing loop with the Exceptions class\n            set_status_header(503);\n            echo 'Unable to locate the specified class: '.$class.'.php';\n            exit(5); \/\/ EXIT_UNK_CLASS\n        }\n\n        \/\/ Keep track of what we just loaded\n        is_loaded($class);\n\n        $_classes[$class] = isset($param)\n            ? new $name($param)\n            : new $name();\n        return $_classes[$class];\n    }\n<\/code><\/pre>\n<p>&amp;is_loaded<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Keeps track of which libraries have been loaded. This function is\n     * called by the load_class() function above\n     *\n     * @param   string\n     * @return  array\n     *\/\n    function &amp;is_loaded($class = '')\n    {\n        static $_is_loaded = array();\n\n        if ($class !== '')\n        {\n            $_is_loaded[strtolower($class)] = $class;\n        }\n\n        return $_is_loaded;\n    }\n<\/code><\/pre>\n<p>&amp;get_config:\u52a0\u8f7dconfig.php\u914d\u7f6e\u6587\u4ef6\u5e76\u8fd4\u56de\uff0c\u6709\u4e00\u4e2a\u53ef\u9009\u6570\u7ec4\u53c2\u6570$replace\uff0c\u5982\u679c\u8fd9\u4e2a\u53c2\u6570\u4e0d\u4e3a\u7a7a\uff0c\u5219\u5c06\u6570\u7ec4\u6dfb\u52a0\u5230\u914d\u7f6e\u4e2d<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Loads the main config.php file\n     *\n     * This function lets us grab the config file even if the Config class\n     * hasn't been instantiated yet\n     *\n     * @param   array\n     * @return  array\n     *\/\n    function &amp;get_config(Array $replace = array())\n    {\n        static $config;\n\n        if (empty($config))\n        {\n            $file_path = APPPATH.'config\/config.php';\n            $found = FALSE;\n            if (file_exists($file_path))\n            {\n                $found = TRUE;\n                require($file_path);\n            }\n\n            \/\/ Is the config file in the environment folder?\n            if (file_exists($file_path = APPPATH.'config\/'.ENVIRONMENT.'\/config.php'))\n            {\n                require($file_path);\n            }\n            elseif ( ! $found)\n            {\n                set_status_header(503);\n                echo 'The configuration file does not exist.';\n                exit(3); \/\/ EXIT_CONFIG\n            }\n\n            \/\/ Does the $config array exist in the file?\n            if ( ! isset($config) OR ! is_array($config))\n            {\n                set_status_header(503);\n                echo 'Your config file does not appear to be formatted correctly.';\n                exit(3); \/\/ EXIT_CONFIG\n            }\n        }\n\n        \/\/ Are any values being dynamically added or replaced?\n        foreach ($replace as $key =&gt; $val)\n        {\n            $config[$key] = $val;\n        }\n\n        return $config;\n    }\n<\/code><\/pre>\n<p>get_item:\u8fd4\u56de\u6307\u5b9a\u914d\u7f6e\u9879<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Returns the specified config item\n     *\n     * @param   string\n     * @return  mixed\n     *\/\n    function config_item($item)\n    {\n        static $_config;\n\n        if (empty($_config))\n        {\n            \/\/ references cannot be directly assigned to static variables, so we use an array\n            $_config[0] =&amp; get_config();\n        }\n\n        return isset($_config[0][$item]) ? $_config[0][$item] : NULL;\n    }\n<\/code><\/pre>\n<p>&amp;get_mimes:\u4ececonfig\/mimes.php\u4e2d\u8fd4\u56deMIME\u7c7b\u578b\u6570\u7ec4<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Returns the MIME types array from config\/mimes.php\n     *\n     * @return  array\n     *\/\n    function &amp;get_mimes()\n    {\n        static $_mimes;\n\n        if (empty($_mimes))\n        {\n            $_mimes = file_exists(APPPATH.'config\/mimes.php')\n                ? include(APPPATH.'config\/mimes.php')\n                : array();\n\n            if (file_exists(APPPATH.'config\/'.ENVIRONMENT.'\/mimes.php'))\n            {\n                $_mimes = array_merge($_mimes, include(APPPATH.'config\/'.ENVIRONMENT.'\/mimes.php'));\n            }\n        }\n\n        return $_mimes;\n    }\n<\/code><\/pre>\n<p>is_https:\u662f\u5426\u662fhttps<\/p>\n<pre><code class=\"language-php line-numbers\">function is_https()\n    {\n        if ( ! empty($_SERVER['HTTPS']) &amp;&amp; strtolower($_SERVER['HTTPS']) !== 'off')\n        {\n            return TRUE;\n        }\n        elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &amp;&amp; strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https')\n        {\n            return TRUE;\n        }\n        elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) &amp;&amp; strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off')\n        {\n            return TRUE;\n        }\n\n        return FALSE;\n    }\n<\/code><\/pre>\n<p>is_cli:\u662f\u5426\u662fcli<\/p>\n<pre><code class=\"language-php line-numbers\">function is_cli()\n    {\n        return (PHP_SAPI === 'cli' OR defined('STDIN'));\n    }\n<\/code><\/pre>\n<p>show_error:\u5c55\u793a\u9519\u8bef\u9875\u9762<\/p>\n<pre><code class=\"language-php line-numbers\">function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered')\n    {\n        $status_code = abs($status_code);\n        if ($status_code &lt; 100)\n        {\n            $exit_status = $status_code + 9; \/\/ 9 is EXIT__AUTO_MIN\n            $status_code = 500;\n        }\n        else\n        {\n            $exit_status = 1; \/\/ EXIT_ERROR\n        }\n\n        $_error =&amp; load_class('Exceptions', 'core');\n        echo $_error-&gt;show_error($heading, $message, 'error_general', $status_code);\n        exit($exit_status);\n    }\n<\/code><\/pre>\n<p>show_404:404\u9875\u9762\u5904\u7406\u5668<\/p>\n<pre><code class=\"language-php line-numbers\">function show_404($page = '', $log_error = TRUE)\n    {\n        $_error =&amp; load_class('Exceptions', 'core');\n        $_error-&gt;show_404($page, $log_error);\n        exit(4); \/\/ EXIT_UNKNOWN_FILE\n    }\n<\/code><\/pre>\n<p>log_message:\u9519\u8bef\u65e5\u5fd7<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Error Logging Interface\n     *\n     * We use this as a simple mechanism to access the logging\n     * class and send messages to be logged.\n     *\n     * @param   string  the error level: 'error', 'debug' or 'info'\n     * @param   string  the error message\n     * @return  void\n     *\/\n    function log_message($level, $message)\n    {\n        static $_log;\n\n        if ($_log === NULL)\n        {\n            \/\/ references cannot be directly assigned to static variables, so we use an array\n            $_log[0] =&amp; load_class('Log', 'core');\n        }\n\n        $_log[0]-&gt;write_log($level, $message);\n    }\n<\/code><\/pre>\n<p>set_status_header:\u8bbe\u7f6e\u54cd\u5e94\u5934<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Set HTTP Status Header\n     *\n     * @param   int the status code\n     * @param   string\n     * @return  void\n     *\/\n    function set_status_header($code = 200, $text = '')\n    {\n        if (is_cli())\n        {\n            return;\n        }\n\n        if (empty($code) OR ! is_numeric($code))\n        {\n            show_error('Status codes must be numeric', 500);\n        }\n\n        if (empty($text))\n        {\n            is_int($code) OR $code = (int) $code;\n            $stati = array(\n                100 =&gt; 'Continue',\n                101 =&gt; 'Switching Protocols',\n\n                200 =&gt; 'OK',\n                201 =&gt; 'Created',\n                202 =&gt; 'Accepted',\n                203 =&gt; 'Non-Authoritative Information',\n                204 =&gt; 'No Content',\n                205 =&gt; 'Reset Content',\n                206 =&gt; 'Partial Content',\n\n                300 =&gt; 'Multiple Choices',\n                301 =&gt; 'Moved Permanently',\n                302 =&gt; 'Found',\n                303 =&gt; 'See Other',\n                304 =&gt; 'Not Modified',\n                305 =&gt; 'Use Proxy',\n                307 =&gt; 'Temporary Redirect',\n\n                400 =&gt; 'Bad Request',\n                401 =&gt; 'Unauthorized',\n                402 =&gt; 'Payment Required',\n                403 =&gt; 'Forbidden',\n                404 =&gt; 'Not Found',\n                405 =&gt; 'Method Not Allowed',\n                406 =&gt; 'Not Acceptable',\n                407 =&gt; 'Proxy Authentication Required',\n                408 =&gt; 'Request Timeout',\n                409 =&gt; 'Conflict',\n                410 =&gt; 'Gone',\n                411 =&gt; 'Length Required',\n                412 =&gt; 'Precondition Failed',\n                413 =&gt; 'Request Entity Too Large',\n                414 =&gt; 'Request-URI Too Long',\n                415 =&gt; 'Unsupported Media Type',\n                416 =&gt; 'Requested Range Not Satisfiable',\n                417 =&gt; 'Expectation Failed',\n                422 =&gt; 'Unprocessable Entity',\n                426 =&gt; 'Upgrade Required',\n                428 =&gt; 'Precondition Required',\n                429 =&gt; 'Too Many Requests',\n                431 =&gt; 'Request Header Fields Too Large',\n\n                500 =&gt; 'Internal Server Error',\n                501 =&gt; 'Not Implemented',\n                502 =&gt; 'Bad Gateway',\n                503 =&gt; 'Service Unavailable',\n                504 =&gt; 'Gateway Timeout',\n                505 =&gt; 'HTTP Version Not Supported',\n                511 =&gt; 'Network Authentication Required',\n            );\n\n            if (isset($stati[$code]))\n            {\n                $text = $stati[$code];\n            }\n            else\n            {\n                show_error('No status text available. Please check your status code number or supply your own message text.', 500);\n            }\n        }\n\n        if (strpos(PHP_SAPI, 'cgi') === 0)\n        {\n            header('Status: '.$code.' '.$text, TRUE);\n            return;\n        }\n\n        $server_protocol = (isset($_SERVER['SERVER_PROTOCOL']) &amp;&amp; in_array($_SERVER['SERVER_PROTOCOL'], array('HTTP\/1.0', 'HTTP\/1.1', 'HTTP\/2'), TRUE))\n            ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP\/1.1';\n        header($server_protocol.' '.$code.' '.$text, TRUE, $code);\n    }\n<\/code><\/pre>\n<p>_error_handler:\u9519\u8bef\u5904\u7406\u5668<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Error Handler\n     *\n     * This is the custom error handler that is declared at the (relative)\n     * top of CodeIgniter.php. The main reason we use this is to permit\n     * PHP errors to be logged in our own log files since the user may\n     * not have access to server logs. Since this function effectively\n     * intercepts PHP errors, however, we also need to display errors\n     * based on the current error_reporting level.\n     * We do that with the use of a PHP error template.\n     *\n     * @param   int $severity\n     * @param   string  $message\n     * @param   string  $filepath\n     * @param   int $line\n     * @return  void\n     *\/\n    function _error_handler($severity, $message, $filepath, $line)\n    {\n        $is_error = (((E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) &amp; $severity) === $severity);\n\n        \/\/ When an error occurred, set the status header to '500 Internal Server Error'\n        \/\/ to indicate to the client something went wrong.\n        \/\/ This can't be done within the $_error-&gt;show_php_error method because\n        \/\/ it is only called when the display_errors flag is set (which isn't usually\n        \/\/ the case in a production environment) or when errors are ignored because\n        \/\/ they are above the error_reporting threshold.\n        if ($is_error)\n        {\n            set_status_header(500);\n        }\n\n        \/\/ Should we ignore the error? We'll get the current error_reporting\n        \/\/ level and add its bits with the severity bits to find out.\n        if (($severity &amp; error_reporting()) !== $severity)\n        {\n            return;\n        }\n\n        $_error =&amp; load_class('Exceptions', 'core');\n        $_error-&gt;log_exception($severity, $message, $filepath, $line);\n\n        \/\/ Should we display the error?\n        if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors')))\n        {\n            $_error-&gt;show_php_error($severity, $message, $filepath, $line);\n        }\n\n        \/\/ If the error is fatal, the execution of the script should be stopped because\n        \/\/ errors can't be recovered from. Halting the script conforms with PHP's\n        \/\/ default error handling. See http:\/\/www.php.net\/manual\/en\/errorfunc.constants.php\n        if ($is_error)\n        {\n            exit(1); \/\/ EXIT_ERROR\n        }\n    }\n<\/code><\/pre>\n<p>_exception_handler:\u5f02\u5e38\u5904\u7406\u5668<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Exception Handler\n     *\n     * Sends uncaught exceptions to the logger and displays them\n     * only if display_errors is On so that they don't show up in\n     * production environments.\n     *\n     * @param   Exception   $exception\n     * @return  void\n     *\/\n    function _exception_handler($exception)\n    {\n        $_error =&amp; load_class('Exceptions', 'core');\n        $_error-&gt;log_exception('error', 'Exception: '.$exception-&gt;getMessage(), $exception-&gt;getFile(), $exception-&gt;getLine());\n\n        is_cli() OR set_status_header(500);\n        \/\/ Should we display the error?\n        if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors')))\n        {\n            $_error-&gt;show_exception($exception);\n        }\n\n        exit(1); \/\/ EXIT_ERROR\n    }\n<\/code><\/pre>\n<p>_shutdown_handler:\u5173\u95ed\u5f02\u5e38\u548c\u9519\u8bef\u5904\u7406\u5668<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Shutdown Handler\n     *\n     * This is the shutdown handler that is declared at the top\n     * of CodeIgniter.php. The main reason we use this is to simulate\n     * a complete custom exception handler.\n     *\n     * E_STRICT is purposively neglected because such events may have\n     * been caught. Duplication or none? None is preferred for now.\n     *\n     * @link    http:\/\/insomanic.me.uk\/post\/229851073\/php-trick-catching-fatal-errors-e-error-with-a\n     * @return  void\n     *\/\n    function _shutdown_handler()\n    {\n        $last_error = error_get_last();\n        if (isset($last_error) &amp;&amp;\n            ($last_error['type'] &amp; (E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING)))\n        {\n            _error_handler($last_error['type'], $last_error['message'], $last_error['file'], $last_error['line']);\n        }\n    }\n}\n<\/code><\/pre>\n<p>remove_invisible_characters:\u5220\u9664\u4e0d\u53ef\u89c1\u5b57\u7b26\uff08\u8fd9\u4e2a\u529f\u80fd\u5728\u5904\u7406\u5b57\u7b26\u4e32\u65f6\u5f88\u6709\u7528\uff09<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Remove Invisible Characters\n     *\n     * This prevents sandwiching null characters\n     * between ascii characters, like Java\\0script.\n     *\n     * @param   string\n     * @param   bool\n     * @return  string\n     *\/\n    function remove_invisible_characters($str, $url_encoded = TRUE)\n    {\n        $non_displayables = array();\n\n        \/\/ every control character except newline (dec 10),\n        \/\/ carriage return (dec 13) and horizontal tab (dec 09)\n        if ($url_encoded)\n        {\n            $non_displayables[] = '\/%0[0-8bcef]\/i'; \/\/ url encoded 00-08, 11, 12, 14, 15\n            $non_displayables[] = '\/%1[0-9a-f]\/i';  \/\/ url encoded 16-31\n            $non_displayables[] = '\/%7f\/i'; \/\/ url encoded 127\n        }\n\n        $non_displayables[] = '\/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]+\/S';   \/\/ 00-08, 11, 12, 14-31, 127\n\n        do\n        {\n            $str = preg_replace($non_displayables, '', $str, -1, $count);\n        }\n        while ($count);\n\n        return $str;\n    }\n<\/code><\/pre>\n<p>html_escape:\u5c06\u5b57\u7b26\u4e32\u8f6c\u4e49\u6210html\u8bed\u53e5<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Returns HTML escaped variable.\n     *\n     * @param   mixed   $var        The input string or array of strings to be escaped.\n     * @param   bool    $double_encode  $double_encode set to FALSE prevents escaping twice.\n     * @return  mixed           The escaped string or array of strings as a result.\n     *\/\n    function html_escape($var, $double_encode = TRUE)\n    {\n        if (empty($var))\n        {\n            return $var;\n        }\n\n        if (is_array($var))\n        {\n            foreach (array_keys($var) as $key)\n            {\n                $var[$key] = html_escape($var[$key], $double_encode);\n            }\n\n            return $var;\n        }\n\n        return htmlspecialchars($var, ENT_QUOTES, config_item('charset'), $double_encode);\n    }\n<\/code><\/pre>\n<p>_stringify_attributes:\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\uff0c\u6570\u7ec4\uff0c\u5bf9\u8c61\uff0c\u8f6c\u6362\u6210\u5b57\u7b26\u4e32<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n     * Stringify attributes for use in HTML tags.\n     *\n     * Helper function used to convert a string, array, or object\n     * of attributes to a string.\n     *\n     * @param   mixed   string, array, object\n     * @param   bool\n     * @return  string\n     *\/\n    function _stringify_attributes($attributes, $js = FALSE)\n    {\n        $atts = NULL;\n\n        if (empty($attributes))\n        {\n            return $atts;\n        }\n\n        if (is_string($attributes))\n        {\n            return ' '.$attributes;\n        }\n\n        $attributes = (array) $attributes;\n\n        foreach ($attributes as $key =&gt; $val)\n        {\n            $atts .= ($js) ? $key.'='.$val.',' : ' '.$key.'=\"'.$val.'\"';\n        }\n\n        return rtrim($atts, ',');\n    }\n<\/code><\/pre>\n<p>function_usable:\u51fd\u6570\u662f\u5426\u53ef\u7528<\/p>\n<pre><code class=\"language-php line-numbers\">function function_usable($function_name)\n    {\n        static $_suhosin_func_blacklist;\n\n        if (function_exists($function_name))\n        {\n            if ( ! isset($_suhosin_func_blacklist))\n            {\n                $_suhosin_func_blacklist = extension_loaded('suhosin')\n                    ? explode(',', trim(ini_get('suhosin.executor.func.blacklist')))\n                    : array();\n            }\n\n            return ! in_array($function_name, $_suhosin_func_blacklist, TRUE);\n        }\n\n        return FALSE;\n    }\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1.\u6982\u8ff0 Common\u4e2d\u58f0\u660e\u4e86\u5f88\u591a\u5e38\u7528\u64cd\u4f5c\u7684\u529f\u80fd\u51fd\u6570\uff0c\u5728CodeIgniter.php\u4e2d\u52a0\u8f7d\u4e86Common.p [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[15],"tags":[405],"class_list":["post-972","post","type-post","status-publish","format-standard","hentry","category-15","tag-php"],"_links":{"self":[{"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=972"}],"version-history":[{"count":3,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/972\/revisions"}],"predecessor-version":[{"id":975,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/972\/revisions\/975"}],"wp:attachment":[{"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}