Add
'allow_module_ip' => ['admin' => '*'], // Set certain IPs to be accessible in config.php Specify the module
['admin' => '*'] All IPs can access the admin module,
['admin' => ['127.0.0.1','192.168.1.100'] ] Only these two IPs can access the admin module
It is best to add it at this location
1 2 3 4 5 6 |
|
Need to modify the framework code
thinkphp/library/think/App.php
The code location is as follows
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
Recommended tutorial: "TP5"
The above is the detailed content of thinkphp5 configures the specified ip access module. For more information, please follow other related articles on the PHP Chinese website!