Thinkphp--System Error mkdir()

请求接口没有开权限。

权限设置:chmod -R 777 文件名

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>System Error</title>
    <meta name="robots" content="noindex,nofollow" />
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <style>
        /* Base */
        body {
    
    
            color: #333;
            font: 14px Verdana, "Helvetica Neue", helvetica, Arial, 'Microsoft YaHei', sans-serif;
            margin: 0;
            padding: 0 20px 20px;
            word-break: break-word;
        }
        h1{
    
    
            margin: 10px 0 0;
            font-size: 28px;
            font-weight: 500;
            line-height: 32px;
        }
        h2{
    
    
            color: #4288ce;
            font-weight: 400;
            padding: 6px 0;
            margin: 6px 0 0;
            font-size: 18px;
            border-bottom: 1px solid #eee;
        }
        h3.subheading {
    
    
            color: #4288ce;
            margin: 6px 0 0;
            font-weight: 400;
        }
        h3{
    
    
            margin: 12px;
            font-size: 16px;
            font-weight: bold;
        }
        abbr{
    
    
            cursor: help;
            text-decoration: underline;
            text-decoration-style: dotted;
        }
        a{
    
    
            color: #868686;
            cursor: pointer;
        }
        a:hover{
    
    
            text-decoration: underline;
        }
        .line-error{
    
    
            background: #f8cbcb;
        }

        .echo table {
    
    
            width: 100%;
        }

        .echo pre {
    
    
            padding: 16px;
            overflow: auto;
            font-size: 85%;
            line-height: 1.45;
            background-color: #f7f7f7;
            border: 0;
            border-radius: 3px;
            font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
        }

        .echo pre > pre {
    
    
            padding: 0;
            margin: 0;
        }
        /* Layout */
        .col-md-3 {
    
    
            width: 25%;
        }
        .col-md-9 {
    
    
            width: 75%;
        }
        [class^="col-md-"] {
    
    
            float: left;
        }
        .clearfix {
    
    
            clear:both;
        }
        @media only screen 
        and (min-device-width : 375px) 
        and (max-device-width : 667px) {
    
     
            .col-md-3,
            .col-md-9 {
    
    
                width: 100%;
            }
        }
        /* Exception Info */
        .exception {
    
    
            margin-top: 20px;
        }
        .exception .message{
    
    
            padding: 12px;
            border: 1px solid #ddd;
            border-bottom: 0 none;
            line-height: 18px;
            font-size:16px;
            border-top-left-radius: 4px;
            border-top-right-radius: 4px;
            font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑";
        }

        .exception .code{
    
    
            float: left;
            text-align: center;
            color: #fff;
            margin-right: 12px;
            padding: 16px;
            border-radius: 4px;
            background: #999;
        }
        .exception .source-code{
    
    
            padding: 6px;
            border: 1px solid #ddd;

            background: #f9f9f9;
            overflow-x: auto;

        }
        .exception .source-code pre{
    
    
            margin: 0;
        }
        .exception .source-code pre ol{
    
    
            margin: 0;
            color: #4288ce;
            display: inline-block;
            min-width: 100%;
            box-sizing: border-box;
        font-size:14px;
            font-family: "Century Gothic",Consolas,"Liberation Mono",Courier,Verdana;
            padding-left: 48px;
        }
        .exception .source-code pre li{
    
    
            border-left: 1px solid #ddd;
            height: 18px;
            line-height: 18px;
        }
        .exception .source-code pre code{
    
    
            color: #333;
            height: 100%;
            display: inline-block;
            border-left: 1px solid #fff;
        font-size:14px;
            font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑";
        }
        .exception .trace{
    
    
            padding: 6px;
            border: 1px solid #ddd;
            border-top: 0 none;
            line-height: 16px;
        font-size:14px;
            font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑";
        }
        .exception .trace ol{
    
    
            margin: 12px;
        }
        .exception .trace ol li{
    
    
            padding: 2px 4px;
        }
        .exception div:last-child{
    
    
            border-bottom-left-radius: 4px;
            border-bottom-right-radius: 4px;
        }

        /* Exception Variables */
        .exception-var table{
    
    
            width: 100%;
            margin: 12px 0;
            box-sizing: border-box;
            table-layout:fixed;
            word-wrap:break-word;            
        }
        .exception-var table caption{
    
    
            text-align: left;
            font-size: 16px;
            font-weight: bold;
            padding: 6px 0;
        }
        .exception-var table caption small{
    
    
            font-weight: 300;
            display: inline-block;
            margin-left: 10px;
            color: #ccc;
        }
        .exception-var table tbody{
    
    
            font-size: 13px;
            font-family: Consolas,"Liberation Mono",Courier,"微软雅黑";
        }
        .exception-var table td{
    
    
            padding: 0 6px;
            vertical-align: top;
            word-break: break-all;
        }
        .exception-var table td:first-child{
    
    
            width: 28%;
            font-weight: bold;
            white-space: nowrap;
        }
        .exception-var table td pre{
    
    
            margin: 0;
        }

        /* Copyright Info */
        .copyright{
    
    
            margin-top: 24px;
            padding: 12px 0;
            border-top: 1px solid #eee;
        }

        /* SPAN elements with the classes below are added by prettyprint. */
        pre.prettyprint .pln {
    
     color: #000 }  /* plain text */
        pre.prettyprint .str {
    
     color: #080 }  /* string content */
        pre.prettyprint .kwd {
    
     color: #008 }  /* a keyword */
        pre.prettyprint .com {
    
     color: #800 }  /* a comment */
        pre.prettyprint .typ {
    
     color: #606 }  /* a type name */
        pre.prettyprint .lit {
    
     color: #066 }  /* a literal value */
        /* punctuation, lisp open bracket, lisp close bracket */
        pre.prettyprint .pun, pre.prettyprint .opn, pre.prettyprint .clo {
    
     color: #660 }
        pre.prettyprint .tag {
    
     color: #008 }  /* a markup tag name */
        pre.prettyprint .atn {
    
     color: #606 }  /* a markup attribute name */
        pre.prettyprint .atv {
    
     color: #080 }  /* a markup attribute value */
        pre.prettyprint .dec, pre.prettyprint .var {
    
     color: #606 }  /* a declaration; a variable name */
        pre.prettyprint .fun {
    
     color: red }  /* a function name */
    </style>
</head>
<body>
    <div class="echo">
            </div>
        <div class="exception">
    <div class="message">
        
            <div class="info">
                <div>
                    <h2>[2]&nbsp;<abbr title="think\exception\ErrorException">ErrorException</abbr> in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/cache/driver/File.php line 56">File.php line 56</a></h2>
                </div>
                <div><h1>mkdir(): Permission denied</h1></div>
            </div>
        
    </div>
	        <div class="source-code">
            <pre class="prettyprint lang-php"><ol start="47"><li class="line-47"><code>    /**
</code></li><li class="line-48"><code>     * 初始化检查
</code></li><li class="line-49"><code>     * @access private
</code></li><li class="line-50"><code>     * @return boolean
</code></li><li class="line-51"><code>     */
</code></li><li class="line-52"><code>    private function init()
</code></li><li class="line-53"><code>    {
    
    
</code></li><li class="line-54"><code>        // 创建项目缓存目录
</code></li><li class="line-55"><code>        if (!is_dir($this-&gt;options['path'])) {
    
    
</code></li><li class="line-56"><code>            if (mkdir($this-&gt;options['path'], 0755, true)) {
    
    
</code></li><li class="line-57"><code>                return true;
</code></li><li class="line-58"><code>            }
</code></li><li class="line-59"><code>        }
</code></li><li class="line-60"><code>        return false;
</code></li><li class="line-61"><code>    }
</code></li><li class="line-62"><code>
</code></li><li class="line-63"><code>    /**
</code></li><li class="line-64"><code>     * 取得变量的存储文件名
</code></li><li class="line-65"><code>     * @access protected
</code></li></ol></pre>
        </div>
	        <div class="trace">
            <h2>Call Stack</h2>
            <ol>
                <li>in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/cache/driver/File.php line 56">File.php line 56</a></li>
                                <li>
                at <abbr title="think\Error">Error</abbr>::appError(2, '<a class="toggle" title="mkdir(): Permission denied">mkdir(): Permission ...</a>', '<a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/cache/driver/File.php">/data/www/fb/apirele...</a>', 56, [])                </li>
                                <li>
                at mkdir('<a class="toggle" title="/data/www/fb/apirelease-fb/runtime/cache/">/data/www/fb/apirele...</a>', 493, <em>true</em>) in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/cache/driver/File.php line 56">File.php line 56</a>                </li>
                                <li>
                at <abbr title="think\cache\driver\File">File</abbr>->init() in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/cache/driver/File.php line 44">File.php line 44</a>                </li>
                                <li>
                at <abbr title="think\cache\driver\File">File</abbr>->__construct(['type' => 'File', 'path' => '<a class="toggle" title="/data/www/fb/apirelease-fb/runtime/cache/">/data/www/fb/apirele...</a>']) in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/Cache.php line 65">Cache.php line 65</a>                </li>
                                <li>
                at <abbr title="think\Cache">Cache</abbr>::connect(['type' => 'File', 'path' => '<a class="toggle" title="/data/www/fb/apirelease-fb/runtime/cache/">/data/www/fb/apirele...</a>']) in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/Cache.php line 88">Cache.php line 88</a>                </li>
                                <li>
                at <abbr title="think\Cache">Cache</abbr>::init() in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/Cache.php line 133">Cache.php line 133</a>                </li>
                                <li>
                at <abbr title="think\Cache">Cache</abbr>::get('<a class="toggle" title="think:fb_s1_game.user|10000005">think:fb_s1_game.use...</a>') in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/db/Query.php line 2430">Query.php line 2430</a>                </li>
                                <li>
                at <abbr title="think\db\Query">Query</abbr>->update(['sex' => '2']) in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/db/Query.php line 642">Query.php line 642</a>                </li>
                                <li>
                at <abbr title="think\db\Query">Query</abbr>->setField('sex', '2') in <a class="toggle" title="/data/www/fb/apirelease-fb/app/index/controller/Useradmin.php line 1080">Useradmin.php line 1080</a>                </li>
                                <li>
                at <abbr title="app\index\controller\Useradmin">Useradmin</abbr>->getusertable('10000005', 'sex', '2') in <a class="toggle" title="/data/www/fb/apirelease-fb/app/index/controller/Useradmin.php line 415">Useradmin.php line 415</a>                </li>
                                <li>
                at <abbr title="app\index\controller\Useradmin">Useradmin</abbr>->userchange()                </li>
                                <li>
                at <abbr title="ReflectionMethod">ReflectionMethod</abbr>->invokeArgs(<em>object</em>(<abbr title="app\index\controller\Useradmin">Useradmin</abbr>), []) in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/App.php line 343">App.php line 343</a>                </li>
                                <li>
                at <abbr title="think\App">App</abbr>::invokeMethod([<em>object</em>(<abbr title="app\index\controller\Useradmin">Useradmin</abbr>), 'userchange'], []) in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/App.php line 611">App.php line 611</a>                </li>
                                <li>
                at <abbr title="think\App">App</abbr>::module(['index', 'Useradmin', 'userchange'], ['app_host' => '', 'app_debug' => <em>true</em>, 'app_trace' => <em>false</em>, ...], <em>null</em>) in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/App.php line 457">App.php line 457</a>                </li>
                                <li>
                at <abbr title="think\App">App</abbr>::exec(['type' => 'module', 'module' => ['index', 'Useradmin', 'userchange']], ['app_host' => '', 'app_debug' => <em>true</em>, 'app_trace' => <em>false</em>, ...]) in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/library/think/App.php line 139">App.php line 139</a>                </li>
                                <li>
                at <abbr title="think\App">App</abbr>::run() in <a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/start.php line 20">start.php line 20</a>                </li>
                                <li>
                at require('<a class="toggle" title="/data/www/fb/apirelease-fb/thinkphp/start.php">/data/www/fb/apirele...</a>') in <a class="toggle" title="/data/www/fb/apirelease-fb/public/index.php line 23">index.php line 23</a>                </li>
                            </ol>
        </div>
    </div>
        
    
        <div class="exception-var">
        <h2>Environment Variables</h2>
                <div>
                        <h3 class="subheading">GET Data</h3>
            <div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>cmd</strong></div>
                    <div class="col-md-9"><small>
                        user                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>t</strong></div>
                    <div class="col-md-9"><small>
                        1631636857                    </small></div>
                </div>
                            </div>
                    </div>
                <div>
                        <div class="clearfix">
                <div class="col-md-3"><strong>POST Data</strong></div>
                <div class="col-md-9"><small>empty</small></div>
            </div>
                    </div>
                <div>
                        <div class="clearfix">
                <div class="col-md-3"><strong>Files</strong></div>
                <div class="col-md-9"><small>empty</small></div>
            </div>
                    </div>
                <div>
                        <div class="clearfix">
                <div class="col-md-3"><strong>Cookies</strong></div>
                <div class="col-md-9"><small>empty</small></div>
            </div>
                    </div>
                <div>
                        <div class="clearfix">
                <div class="col-md-3"><strong>Session</strong></div>
                <div class="col-md-9"><small>empty</small></div>
            </div>
                    </div>
                <div>
                        <h3 class="subheading">Server/Request Data</h3>
            <div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>USER</strong></div>
                    <div class="col-md-9"><small>
                        apache                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>HOME</strong></div>
                    <div class="col-md-9"><small>
                        /var/www                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>FCGI_ROLE</strong></div>
                    <div class="col-md-9"><small>
                        RESPONDER                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>SCRIPT_FILENAME</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/public/index.php                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>QUERY_STRING</strong></div>
                    <div class="col-md-9"><small>
                        s=//index/Useradmin/userchange&amp;cmd=user&amp;t=1631636857                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>REQUEST_METHOD</strong></div>
                    <div class="col-md-9"><small>
                        POST                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>CONTENT_TYPE</strong></div>
                    <div class="col-md-9"><small>
                        application/json; charset=utf-8                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>CONTENT_LENGTH</strong></div>
                    <div class="col-md-9"><small>
                        374                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>SCRIPT_NAME</strong></div>
                    <div class="col-md-9"><small>
                        /index.php                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>REQUEST_URI</strong></div>
                    <div class="col-md-9"><small>
                        /index/Useradmin/userchange?cmd=user&amp;t=1631636857                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>DOCUMENT_URI</strong></div>
                    <div class="col-md-9"><small>
                        /index.php                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>DOCUMENT_ROOT</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/public                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>SERVER_PROTOCOL</strong></div>
                    <div class="col-md-9"><small>
                        HTTP/1.1                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>GATEWAY_INTERFACE</strong></div>
                    <div class="col-md-9"><small>
                        CGI/1.1                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>SERVER_SOFTWARE</strong></div>
                    <div class="col-md-9"><small>
                        nginx/1.6.0                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>REMOTE_ADDR</strong></div>
                    <div class="col-md-9"><small>
                        192.168.110.254                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>REMOTE_PORT</strong></div>
                    <div class="col-md-9"><small>
                        50224                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>SERVER_ADDR</strong></div>
                    <div class="col-md-9"><small>
                        192.168.110.254                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>SERVER_PORT</strong></div>
                    <div class="col-md-9"><small>
                        85                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>SERVER_NAME</strong></div>
                    <div class="col-md-9"><small>
                        localhost                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>REDIRECT_STATUS</strong></div>
                    <div class="col-md-9"><small>
                        200                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>HTTP_HOST</strong></div>
                    <div class="col-md-9"><small>
                        192.168.110.254:85                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>HTTP_ACCEPT</strong></div>
                    <div class="col-md-9"><small>
                        */*                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>HTTP_CONTENT_TYPE</strong></div>
                    <div class="col-md-9"><small>
                        application/json; charset=utf-8                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>HTTP_CONTENT_LENGTH</strong></div>
                    <div class="col-md-9"><small>
                        374                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>PHP_SELF</strong></div>
                    <div class="col-md-9"><small>
                        /index.php                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>REQUEST_TIME_FLOAT</strong></div>
                    <div class="col-md-9"><small>
                        1631636857.9518                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>REQUEST_TIME</strong></div>
                    <div class="col-md-9"><small>
                        1631636857                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>PATH_INFO</strong></div>
                    <div class="col-md-9"><small>
                        //index/Useradmin/userchange                    </small></div>
                </div>
                            </div>
                    </div>
                <div>
                        <div class="clearfix">
                <div class="col-md-3"><strong>Environment Variables</strong></div>
                <div class="col-md-9"><small>empty</small></div>
            </div>
                    </div>
                <div>
                        <h3 class="subheading">ThinkPHP Constants</h3>
            <div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>APP_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/public/../app/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>KKK_VERSION</strong></div>
                    <div class="col-md-9"><small>
                        1.3.3                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>EXTEND_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/public/../extend/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>VENDOR_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/public/../vendor/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>THINK_VERSION</strong></div>
                    <div class="col-md-9"><small>
                        5.0.23                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>THINK_START_TIME</strong></div>
                    <div class="col-md-9"><small>
                        1631636857.9521                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>THINK_START_MEM</strong></div>
                    <div class="col-md-9"><small>
                        266696                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>EXT</strong></div>
                    <div class="col-md-9"><small>
                        .php                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>DS</strong></div>
                    <div class="col-md-9"><small>
                        /                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>THINK_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/thinkphp/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>LIB_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/thinkphp/library/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>CORE_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/thinkphp/library/think/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>TRAIT_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/thinkphp/library/traits/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>ROOT_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>RUNTIME_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/runtime/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>LOG_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/runtime/log/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>CACHE_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/runtime/cache/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>TEMP_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/runtime/temp/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>CONF_PATH</strong></div>
                    <div class="col-md-9"><small>
                        /data/www/fb/apirelease-fb/public/../app/                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>CONF_EXT</strong></div>
                    <div class="col-md-9"><small>
                        .php                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>ENV_PREFIX</strong></div>
                    <div class="col-md-9"><small>
                        PHP_                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>IS_CLI</strong></div>
                    <div class="col-md-9"><small>
                        false                    </small></div>
                </div>
                                <div class="clearfix">
                    <div class="col-md-3"><strong>IS_WIN</strong></div>
                    <div class="col-md-9"><small>
                        false                    </small></div>
                </div>
                            </div>
                    </div>
            </div>
    

        <script>
        var LINE = 56;

        function $(selector, node){
    
    
            var elements;

            node = node || document;
            if(document.querySelectorAll){
    
    
                elements = node.querySelectorAll(selector);
            } else {
    
    
                switch(selector.substr(0, 1)){
    
    
                    case '#':
                        elements = [node.getElementById(selector.substr(1))];
                        break;
                    case '.':
                        if(document.getElementsByClassName){
    
    
                            elements = node.getElementsByClassName(selector.substr(1));
                        } else {
    
    
                            elements = get_elements_by_class(selector.substr(1), node);
                        }
                        break;
                    default:
                        elements = node.getElementsByTagName();
                }
            }
            return elements;

            function get_elements_by_class(search_class, node, tag) {
    
    
                var elements = [], eles, 
                    pattern  = new RegExp('(^|\\s)' + search_class + '(\\s|$)');

                node = node || document;
                tag  = tag  || '*';

                eles = node.getElementsByTagName(tag);
                for(var i = 0; i < eles.length; i++) {
    
    
                    if(pattern.test(eles[i].className)) {
    
    
                        elements.push(eles[i])
                    }
                }

                return elements;
            }
        }

        $.getScript = function(src, func){
    
    
            var script = document.createElement('script');
            
            script.async  = 'async';
            script.src    = src;
            script.onload = func || function(){
    
    };
            
            $('head')[0].appendChild(script);
        }

        ;(function(){
    
    
            var files = $('.toggle');
            var ol    = $('ol', $('.prettyprint')[0]);
            var li    = $('li', ol[0]);   

            // 短路径和长路径变换
            for(var i = 0; i < files.length; i++){
    
    
                files[i].ondblclick = function(){
    
    
                    var title = this.title;

                    this.title = this.innerHTML;
                    this.innerHTML = title;
                }
            }

            // 设置出错行
            var err_line = $('.line-' + LINE, ol[0])[0];
            err_line.className = err_line.className + ' line-error';

            $.getScript('//cdn.bootcss.com/prettify/r298/prettify.min.js', function(){
    
    
                prettyPrint();

                // 解决Firefox浏览器一个很诡异的问题
                // 当代码高亮后,ol的行号莫名其妙的错位
                // 但是只要刷新li里面的html重新渲染就没有问题了
                if(window.navigator.userAgent.indexOf('Firefox') >= 0){
    
    
                    ol[0].innerHTML = ol[0].innerHTML;
                }
            });

        })();
    </script>
    </body>
</html>

猜你喜欢

转载自blog.csdn.net/weixin_41429587/article/details/120314144