{"id":968,"date":"2019-08-15T15:56:58","date_gmt":"2019-08-15T07:56:58","guid":{"rendered":"https:\/\/wyxxt.org.cn\/?p=968"},"modified":"2023-12-04T16:42:22","modified_gmt":"2023-12-04T08:42:22","slug":"codeigniter2-%e6%a1%86%e6%9e%b6%e6%a0%b8%e5%bf%83codeigniter-php","status":"publish","type":"post","link":"https:\/\/wyxxt.org.cn\/?p=968","title":{"rendered":"CodeIgniter(2)\u2014\u2014\u6846\u67b6\u6838\u5fc3CodeIgniter.php"},"content":{"rendered":"<h3>1.\u6982\u8ff0<\/h3>\n<p>\u5b98\u65b9\u6ce8\u91ca\uff1a<\/p>\n<pre><code class=\"language-php line-numbers\">\/**\n * System Initialization File\n *\n * Loads the base classes and executes the request.\n *\n * @package     CodeIgniter\n * @subpackage  CodeIgniter\n * @category    Front-controller\n * @author      EllisLab Dev Team\n * @link        https:\/\/codeigniter.com\/user_guide\/\n *\/\n\n<\/code><\/pre>\n<h3>2.\u9605\u8bfb\u6e90\u7801<\/h3>\n<p>BASEPATH\u5e38\u91cf\u662f\u5728index.php\u4e2d\u5b9a\u4e49\u7684\uff0c\u8fd9\u91cc\u5224\u65adBASEPATH\u662f\u5426\u5b58\u5728\u662f\u9632\u6b62\u7528\u6237\u7ed5\u8fc7\u5165\u53e3\u76f4\u63a5\u8fd4\u56de\u6587\u4ef6<\/p>\n<pre><code class=\"language-php line-numbers\">defined('BASEPATH') OR exit('No direct script access allowed');\n<\/code><\/pre>\n<p>\u7248\u672c\u53f7<\/p>\n<pre><code class=\"language-php line-numbers\">    const CI_VERSION = '3.1.10';\n<\/code><\/pre>\n<p>\u52a0\u8f7d\u6846\u67b6\u9884\u5b9a\u4e49\u5e38\u91cf<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Load the framework constants\n * ------------------------------------------------------\n *\/\n    if (file_exists(APPPATH.'config\/'.ENVIRONMENT.'\/constants.php'))\n    {\n        require_once(APPPATH.'config\/'.ENVIRONMENT.'\/constants.php');\n    }\n\n    if (file_exists(APPPATH.'config\/constants.php'))\n    {\n        require_once(APPPATH.'config\/constants.php');\n    }\n<\/code><\/pre>\n<p>\u52a0\u8f7d\u5168\u5c40\u516c\u5171\u51fd\u6570<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Load the global functions\n * ------------------------------------------------------\n *\/\n    require_once(BASEPATH.'core\/Common.php');\n<\/code><\/pre>\n<p>\u5b89\u5168\u7a0b\u5e8f<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n * Security procedures\n * ------------------------------------------------------\n *\/\n\nif ( ! is_php('5.4'))\n{\n    ini_set('magic_quotes_runtime', 0);\n\n    if ((bool) ini_get('register_globals'))\n    {\n        $_protected = array(\n            '_SERVER',\n            '_GET',\n            '_POST',\n            '_FILES',\n            '_REQUEST',\n            '_SESSION',\n            '_ENV',\n            '_COOKIE',\n            'GLOBALS',\n            'HTTP_RAW_POST_DATA',\n            'system_path',\n            'application_folder',\n            'view_folder',\n            '_protected',\n            '_registered'\n        );\n\n        $_registered = ini_get('variables_order');\n        foreach (array('E' =&gt; '_ENV', 'G' =&gt; '_GET', 'P' =&gt; '_POST', 'C' =&gt; '_COOKIE', 'S' =&gt; '_SERVER') as $key =&gt; $superglobal)\n        {\n            if (strpos($_registered, $key) === FALSE)\n            {\n                continue;\n            }\n\n            foreach (array_keys($$superglobal) as $var)\n            {\n                if (isset($GLOBALS[$var]) &amp;&amp; ! in_array($var, $_protected, TRUE))\n                {\n                    $GLOBALS[$var] = NULL;\n                }\n            }\n        }\n    }\n}\n\n<\/code><\/pre>\n<p>\u5b9a\u4e49\u9519\u8bef\u5904\u7406\u5668<\/p>\n<pre><code class=\"language-php line-numbers\"><br \/>\/*\n * ------------------------------------------------------\n *  Define a custom error handler so we can log PHP errors\n * ------------------------------------------------------\n *\/\n    set_error_handler('_error_handler');\n    set_exception_handler('_exception_handler');\n    register_shutdown_function('_shutdown_handler');\n\n<\/code><\/pre>\n<p>$assign_to_config\u5728index.php\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u53d8\u91cf,\u5982\u679c\u8fd9\u4e2a\u53d8\u91cf\u4e0d\u4e3a\u7a7a\uff0c\u5219\u628a\u6570\u7ec4\u5185\u5bb9\u8d4b\u503c\u5230\u914d\u7f6e\u53c2\u6570\u4e2d\u53bb\uff0c\u4ece\u8fd9\u91cc\u4e5f\u53ef\u4ee5\u770b\u5f97\u51fa\uff0cassign_to_config\u7684\u914d\u7f6e\u4f18\u5148\u7ea7\u662f\u9ad8\u4e8e\u914d\u7f6e\u6587\u4ef6\u7684<\/p>\n<pre><code class=\"language-php line-numbers\">    if ( ! empty($assign_to_config['subclass_prefix']))\n    {\n        get_config(array('subclass_prefix' =&gt; $assign_to_config['subclass_prefix']));\n    }\n\n<\/code><\/pre>\n<p>\u662f\u5426\u4f7f\u7528Composer<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Should we use a Composer autoloader?\n * ------------------------------------------------------\n *\/\n    if ($composer_autoload = config_item('composer_autoload'))\n    {\n        if ($composer_autoload === TRUE)\n        {\n            file_exists(APPPATH.'vendor\/autoload.php')\n                ? require_once(APPPATH.'vendor\/autoload.php')\n                : log_message('error', '$config[\\'composer_autoload\\'] is set to TRUE but '.APPPATH.'vendor\/autoload.php was not found.');\n        }\n        elseif (file_exists($composer_autoload))\n        {\n            require_once($composer_autoload);\n        }\n        else\n        {\n            log_message('error', 'Could not find the specified $config[\\'composer_autoload\\'] path: '.$composer_autoload);\n        }\n    }\n\n<\/code><\/pre>\n<p>\u52a0\u8f7dBenchmark\u7ec4\u4ef6\uff0c\u76d1\u6d4b\u8ddf\u8e2a\u6027\u80fd<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Start the timer... tick tock tick tock...\n * ------------------------------------------------------\n *\/\n    $BM =&amp; load_class('Benchmark', 'core');\n    $BM-&gt;mark('total_execution_time_start');\n    $BM-&gt;mark('loading_time:_base_classes_start');\n\n<\/code><\/pre>\n<p>\u52a0\u8f7dHooks\u7ec4\u4ef6\uff0cHooks\u7ec4\u4ef6\u53ef\u4ee5\u5728\u4e0d\u6539\u53d8\u7cfb\u7edf\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\u589e\u52a0\u6269\u5c55\u529f\u80fd\uff0c\u6269\u5c55\u65b9\u5f0f\u5c31\u662f\u5728\u7cfb\u7edf\u67d0\u4e2a\u4f4d\u7f6e\u653e\u7f6e\u6302\u94a9\u70b9\uff0c\u4f8b\u5982\uff1apre_system\uff0c\u5c31\u662f\u653e\u7f6e\u5728\u7cfb\u7edf\u4e2d\u7684\u6302\u94a9\u70b9<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Instantiate the hooks class\n * ------------------------------------------------------\n *\/\n    $EXT =&amp; load_class('Hooks', 'core');\n\n\/*\n * ------------------------------------------------------\n *  Is there a \"pre_system\" hook?\n * ------------------------------------------------------\n *\/\n    $EXT-&gt;call_hook('pre_system');\n<\/code><\/pre>\n<p>\u52a0\u8f7dConfig\u7ec4\u4ef6\uff0c Config\u7ec4\u4ef6\u662f\u5bf9\u914d\u7f6e\u53c2\u6570\u8fdb\u884c\u7ba1\u7406\uff0c\u5982\u679cassign_to_config\u53d8\u91cf\u4e0d\u4e3a\u7a7a\uff0c\u5219\u5c06\u5176\u503c\u6dfb\u52a0\u5230\u914d\u7f6e\u53c2\u6570\u4e2d<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Instantiate the config class\n * ------------------------------------------------------\n *\n * Note: It is important that Config is loaded first as\n * most other classes depend on it either directly or by\n * depending on another class that uses it.\n *\n *\/\n    $CFG =&amp; load_class('Config', 'core');\n\n    \/\/ Do we have any manually set config items in the index.php file?\n    if (isset($assign_to_config) &amp;&amp; is_array($assign_to_config))\n    {\n        foreach ($assign_to_config as $key =&gt; $value)\n        {\n            $CFG-&gt;set_item($key, $value);\n        }\n    }\n\n<\/code><\/pre>\n<p>\u8bbe\u7f6e\u5b57\u7b26\u4e32\u7f16\u7801\u683c\u5f0f<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n * Important charset-related stuff\n * ------------------------------------------------------\n *\n * Configure mbstring and\/or iconv if they are enabled\n * and set MB_ENABLED and ICONV_ENABLED constants, so\n * that we don't repeatedly do extension_loaded() or\n * function_exists() calls.\n *\n * Note: UTF-8 class depends on this. It used to be done\n * in it's constructor, but it's _not_ class-specific.\n *\n *\/\n    $charset = strtoupper(config_item('charset'));\n    ini_set('default_charset', $charset);\n\n    if (extension_loaded('mbstring'))\n    {\n        define('MB_ENABLED', TRUE);\n        \/\/ mbstring.internal_encoding is deprecated starting with PHP 5.6\n        \/\/ and it's usage triggers E_DEPRECATED messages.\n        @ini_set('mbstring.internal_encoding', $charset);\n        \/\/ This is required for mb_convert_encoding() to strip invalid characters.\n        \/\/ That's utilized by CI_Utf8, but it's also done for consistency with iconv.\n        mb_substitute_character('none');\n    }\n    else\n    {\n        define('MB_ENABLED', FALSE);\n    }\n\n    \/\/ There's an ICONV_IMPL constant, but the PHP manual says that using\n    \/\/ iconv's predefined constants is \"strongly discouraged\".\n    if (extension_loaded('iconv'))\n    {\n        define('ICONV_ENABLED', TRUE);\n        \/\/ iconv.internal_encoding is deprecated starting with PHP 5.6\n        \/\/ and it's usage triggers E_DEPRECATED messages.\n        @ini_set('iconv.internal_encoding', $charset);\n    }\n    else\n    {\n        define('ICONV_ENABLED', FALSE);\n    }\n\n    if (is_php('5.6'))\n    {\n        ini_set('php.internal_encoding', $charset);\n    }\n\n<\/code><\/pre>\n<p>\u52a0\u8f7d\u517c\u5bb9\u6027\u529f\u80fd<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Load compatibility features\n * ------------------------------------------------------\n *\/\n\n    require_once(BASEPATH.'core\/compat\/mbstring.php');\n    require_once(BASEPATH.'core\/compat\/hash.php');\n    require_once(BASEPATH.'core\/compat\/password.php');\n    require_once(BASEPATH.'core\/compat\/standard.php');\n\n<\/code><\/pre>\n<p>\u52a0\u8f7dUTF-8\u7ec4\u4ef6<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Instantiate the UTF-8 class\n * ------------------------------------------------------\n *\/\n    $UNI =&amp; load_class('Utf8', 'core');\n\n<\/code><\/pre>\n<p>\u52a0\u8f7dURI\u7ec4\u4ef6<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Instantiate the URI class\n * ------------------------------------------------------\n *\/\n    $URI =&amp; load_class('URI', 'core');\n\n<\/code><\/pre>\n<p>\u52a0\u8f7dRouter\u7ec4\u4ef6<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Instantiate the routing class and set the routing\n * ------------------------------------------------------\n *\/\n    $RTR =&amp; load_class('Router', 'core', isset($routing) ? $routing : NULL);\n\n<\/code><\/pre>\n<p>\u52a0\u8f7dOutput\u7ec4\u4ef6<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Instantiate the output class\n * ------------------------------------------------------\n *\/\n    $OUT =&amp; load_class('Output', 'core');\n\n<\/code><\/pre>\n<pre><code class=\"language-php line-numbers\"><br \/>cache_override\u662f\u4e00\u4e2a\u6302\u94a9\u70b9\uff0c\u8fd9\u4e2a\u6302\u94a9\u70b9\u53ef\u4ee5\u81ea\u5b9a\u4e49\u7f13\u5b58\u7b56\u7565\uff0c\u5982\u679c\u6ca1\u6709\u6269\u5c55\u8fd9\u4e2a\u94a9\u5b50\uff0c\u67e5\u770b\u8f93\u51fa\u7ec4\u4ef6\u662f\u5426\u6709\u7f13\u5b58\uff0c\u6709\u7f13\u5b58\u5219\u76f4\u63a5\u8f93\u51fa\n\/*\n * ------------------------------------------------------\n *  Is there a valid cache file? If so, we're done...\n * ------------------------------------------------------\n *\/\n    if ($EXT-&gt;call_hook('cache_override') === FALSE &amp;&amp; $OUT-&gt;_display_cache($CFG, $URI) === TRUE)\n    {\n        exit;\n    }\n\n<\/code><\/pre>\n<p>\u7f13\u5b58\u6ca1\u6709\u547d\u4e2d\u624d\u4f1a\u7ee7\u7eed\u6267\u884c<\/p>\n<p>\u52a0\u8f7dSecurity\u7ec4\u4ef6\uff0c\u53ef\u4ee5\u9632\u8303xss\uff0ccsrf\u7b49\u7f51\u7edc\u653b\u51fb<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * -----------------------------------------------------\n * Load the security class for xss and csrf support\n * -----------------------------------------------------\n *\/\n    $SEC =&amp; load_class('Security', 'core');\n\n<\/code><\/pre>\n<p>\u52a0\u8f7dInput\u7ec4\u4ef6\uff0c\u53ef\u901a\u8fc7input\u8bfb\u53d6\u5ba2\u6237\u7aef\u8f93\u5165\uff0c\u8868\u5355\u63d0\u4ea4\u7b49\u6570\u636e<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Load the Input class and sanitize globals\n * ------------------------------------------------------\n *\/\n    $IN =&amp; load_class('Input', 'core');\n\n<\/code><\/pre>\n<p>\u52a0\u8f7dLang\u7ec4\u4ef6<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Load the Language class\n * ------------------------------------------------------\n *\/\n    $LANG =&amp; load_class('Lang', 'core');\n\n<\/code><\/pre>\n<p>\u52a0\u8f7d\u63a7\u5236\u5668\u57fa\u7c7b<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Load the app controller and local controller\n * ------------------------------------------------------\n *\n *\/\n    \/\/ Load the base controller class\n    require_once BASEPATH.'core\/Controller.php';\n\n    \/**\n     * Reference to the CI_Controller method.\n     *\n     * Returns current CI instance object\n     *\n     * @return CI_Controller\n     *\/\n    function &amp;get_instance()\n    {\n        return CI_Controller::get_instance();\n    }\n\n    if (file_exists(APPPATH.'core\/'.$CFG-&gt;config['subclass_prefix'].'Controller.php'))\n    {\n        require_once APPPATH.'core\/'.$CFG-&gt;config['subclass_prefix'].'Controller.php';\n    }\n\n<\/code><\/pre>\n<p>\u7406\u667a\u68c0\u67e5\uff0c\u68c0\u67e5\u7c7b\u548c\u65b9\u6cd5<\/p>\n<pre><code class=\"language-php line-numbers\"><br \/>\/*\n * ------------------------------------------------------\n *  Sanity checks\n * ------------------------------------------------------\n *\n *  The Router class has already validated the request,\n *  leaving us with 3 options here:\n *\n *  1) an empty class name, if we reached the default\n *     controller, but it didn't exist;\n *  2) a query string which doesn't go through a\n *     file_exists() check\n *  3) a regular request for a non-existing page\n *\n *  We handle all of these as a 404 error.\n *\n *  Furthermore, none of the methods in the app controller\n *  or the loader class can be called via the URI, nor can\n *  controller methods that begin with an underscore.\n *\/\n\n    $e404 = FALSE;\n    $class = ucfirst($RTR-&gt;class);\n    $method = $RTR-&gt;method;\n\n    if (empty($class) OR ! file_exists(APPPATH.'controllers\/'.$RTR-&gt;directory.$class.'.php'))\n    {\n        $e404 = TRUE;\n    }\n    else\n    {\n        require_once(APPPATH.'controllers\/'.$RTR-&gt;directory.$class.'.php');\n\n        if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method))\n        {\n            $e404 = TRUE;\n        }\n        elseif (method_exists($class, '_remap'))\n        {\n            $params = array($method, array_slice($URI-&gt;rsegments, 2));\n            $method = '_remap';\n        }\n        elseif ( ! method_exists($class, $method))\n        {\n            $e404 = TRUE;\n        }\n        \/**\n         * DO NOT CHANGE THIS, NOTHING ELSE WORKS!\n         *\n         * - method_exists() returns true for non-public methods, which passes the previous elseif\n         * - is_callable() returns false for PHP 4-style constructors, even if there's a __construct()\n         * - method_exists($class, '__construct') won't work because CI_Controller::__construct() is inherited\n         * - People will only complain if this doesn't work, even though it is documented that it shouldn't.\n         *\n         * ReflectionMethod::isConstructor() is the ONLY reliable check,\n         * knowing which method will be executed as a constructor.\n         *\/\n        elseif ( ! is_callable(array($class, $method)))\n        {\n            $reflection = new ReflectionMethod($class, $method);\n            if ( ! $reflection-&gt;isPublic() OR $reflection-&gt;isConstructor())\n            {\n                $e404 = TRUE;\n            }\n        }\n    }\n\n    if ($e404)\n    {\n        if ( ! empty($RTR-&gt;routes['404_override']))\n        {\n            if (sscanf($RTR-&gt;routes['404_override'], '%[^\/]\/%s', $error_class, $error_method) !== 2)\n            {\n                $error_method = 'index';\n            }\n\n            $error_class = ucfirst($error_class);\n\n            if ( ! class_exists($error_class, FALSE))\n            {\n                if (file_exists(APPPATH.'controllers\/'.$RTR-&gt;directory.$error_class.'.php'))\n                {\n                    require_once(APPPATH.'controllers\/'.$RTR-&gt;directory.$error_class.'.php');\n                    $e404 = ! class_exists($error_class, FALSE);\n                }\n                \/\/ Were we in a directory? If so, check for a global override\n                elseif ( ! empty($RTR-&gt;directory) &amp;&amp; file_exists(APPPATH.'controllers\/'.$error_class.'.php'))\n                {\n                    require_once(APPPATH.'controllers\/'.$error_class.'.php');\n                    if (($e404 = ! class_exists($error_class, FALSE)) === FALSE)\n                    {\n                        $RTR-&gt;directory = '';\n                    }\n                }\n            }\n            else\n            {\n                $e404 = FALSE;\n            }\n        }\n\n        \/\/ Did we reset the $e404 flag? If so, set the rsegments, starting from index 1\n        if ( ! $e404)\n        {\n            $class = $error_class;\n            $method = $error_method;\n\n            $URI-&gt;rsegments = array(\n                1 =&gt; $class,\n                2 =&gt; $method\n            );\n        }\n        else\n        {\n            show_404($RTR-&gt;directory.$class.'\/'.$method);\n        }\n    }\n\n    if ($method !== '_remap')\n    {\n        $params = array_slice($URI-&gt;rsegments, 2);\n    }\n\n<\/code><\/pre>\n<p>\u8fd0\u884c\u63a7\u5236\u5668\u65b9\u6cd5<\/p>\n<pre><code class=\"language-php line-numbers\"><br \/>\/*\n * ------------------------------------------------------\n *  Is there a \"pre_controller\" hook?\n * ------------------------------------------------------\n *\/\n    $EXT-&gt;call_hook('pre_controller');\n\n\/*\n * ------------------------------------------------------\n *  Instantiate the requested controller\n * ------------------------------------------------------\n *\/\n    \/\/ Mark a start point so we can benchmark the controller\n    $BM-&gt;mark('controller_execution_time_( '.$class.' \/ '.$method.' )_start');\n\n    $CI = new $class();\n\n\/*\n * ------------------------------------------------------\n *  Is there a \"post_controller_constructor\" hook?\n * ------------------------------------------------------\n *\/\n    $EXT-&gt;call_hook('post_controller_constructor');\n\n\/*\n * ------------------------------------------------------\n *  Call the requested method\n * ------------------------------------------------------\n *\/\n    call_user_func_array(array(&amp;$CI, $method), $params);\n\n    \/\/ Mark a benchmark end point\n    $BM-&gt;mark('controller_execution_time_( '.$class.' \/ '.$method.' )_end');\n\n\/*\n * ------------------------------------------------------\n *  Is there a \"post_controller\" hook?\n * ------------------------------------------------------\n *\/\n    $EXT-&gt;call_hook('post_controller');\n\n<\/code><\/pre>\n<p>\u8f93\u51fa\u5185\u5bb9<\/p>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Send the final rendered output to the browser\n * ------------------------------------------------------\n *\/\n    if ($EXT-&gt;call_hook('display_override') === FALSE)\n    {\n        $OUT-&gt;_display();\n    }\n\n<\/code><\/pre>\n<pre><code class=\"language-php line-numbers\">\/*\n * ------------------------------------------------------\n *  Is there a \"post_system\" hook?\n * ------------------------------------------------------\n *\/\n    $EXT-&gt;call_hook('post_system');\n\n<\/code><\/pre>\n<p>\u6b64\u5904\u56de\u987e\u6574\u4e2a\u4ee3\u7801\u6d41\u7a0b\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/oss.wyxxt.org.cn\/images\/2021\/09\/18\/7d195a743bbe1017b6362bad56e9bbff.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u6982\u8ff0 \u5b98\u65b9\u6ce8\u91ca\uff1a \/** * System Initialization File * * Loads t [&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-968","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\/968","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=968"}],"version-history":[{"count":3,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/968\/revisions"}],"predecessor-version":[{"id":971,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/968\/revisions\/971"}],"wp:attachment":[{"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wyxxt.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}