2017-02-02 3 views
0

phpmyadmin index.php은 실행시 config.inc.php이라고합니다.

그래서 이런 config.inc.php

/* 
* First server 
*/ 
$i++; 
/* Authentication type */ 
$cfg['Servers'][$i]['auth_type'] = 'cookie'; 
/* Server parameters */ 
$cfg['Servers'][$i]['host'] = $_GET['test']; // I changed here 
$cfg['Servers'][$i]['connect_type'] = 'tcp'; 
$cfg['Servers'][$i]['compress'] = false; 

및 전화 URL에 노력했다.

http://localhost/index.php?test=211.212.14.11 

그러나 표시 호스트 오류가 발생하여 작동하지 않습니다. 어떻게하면됩니까? 대신 phpMyAdmin에 의해 살균되는, 여기 GET을 사용

답변

1

는 적절한 구문은 지시문에서 직접 IP 주소 또는 호스트 이름을 넣어하는 것 같은 $cfg['Servers'][$i]['host'] = '192.168.5.6'; 또는 사용자가 정의 할 수있게하려면

$cfg['Servers'][$i]['host'] = 'db.example.com'; 로그인 할 때 임의의 호스트 인 경우 $cfg['AllowArbitraryServer'] 지시문을 찾습니다 (true로 설정된 경우 로그온 페이지에 서버를 입력 할 수 있음).