Home  >  Article  >  Database  >  How to enter phpmyadmin using IP

How to enter phpmyadmin using IP

尚
Original
2019-12-24 10:02:112618browse

How to enter phpmyadmin using IP

If you want to restrict only a specific IP address range to access phpmyadmin, you can modify the configuration file config.inc.php and set:

Add in the first line :

$ip_prefix = '192.168.1.';
if(substr($_SERVER['REMOTE_ADDR'], 0, strlen($ip_prefix)) != $ip_prefix)die('illegal access error');

ip can be set to the IP of your own computer. If it is an intranet, it is recommended to directly set it to your own IP address instead of the IP address segment. This will prevent other users from accessing the internal network. If it is a public network IP restriction, just use it directly.

Recommended learning: phpmyadmin tutorial

The above is the detailed content of How to enter phpmyadmin using IP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn