Navicat http 通道增長驗證

 

ntunnel_mysql.php 中增長php

function check() {
    
    if (!isset($_SERVER['PHP_AUTH_USER'])) {
        header('WWW-Authenticate: Basic realm="My Realm"');
        header('HTTP/1.0 401 Unauthorized');
        //             echo 'Text to send if user hits Cancel button';
        exit;
    }
    
    if(!($_SERVER['PHP_AUTH_USER'] == 'mysql' &&  $_SERVER['PHP_AUTH_PW'] == 'wenxue'))
    {
        exit;
    }
    
}

check();

 

相關文章
相關標籤/搜索