Home >Backend Development >PHP Tutorial >Simple method to restrict phpmyadmin's access to IP_PHP Tutorial
Modify: config.inc.php
Add
on the first line$ip_prefix = '192.168.121.';
if (substr($_SERVER['REMOTE_ADDR'], 0, strlen($ip_prefix)) != $ip_prefix ) die('illegal access error');
The 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.
It’s just a simple limitation. It’s just a temporary limitation without big requirements. You can use this method. Temporarily restrict user access.