Simple method to restrict phpmyadmin's access to IP_PHP Tutorial

WBOY
Release: 2016-07-21 15:13:16
Original
1070 people have browsed it

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326546.htmlTechArticleModify: config.inc.php Add $ip_prefix = '192.168.121.' in the first line; if ( substr($_SERVER['REMOTE_ADDR'], 0, strlen($ip_prefix)) != $ip_prefix ) die('illegal access error'); ip can...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!