Commit d7dbe639 authored by zhoujun's avatar zhoujun

限制IP

parent 62a51ac9
HJ3v6x9RQpzg4PLP
\ No newline at end of file
<?php
if(!empty($_SERVER['HTTP_CLIENT_IP'])){
$ip = $_SERVER['HTTP_CLIENT_IP'];
}elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}else{
$ip = $_SERVER['REMOTE_ADDR'];
}
if(!in_array($ip,['116.227.124.169','116.227.126.145'])){
echo '页面走丢了';
exit();
}
/**
* Laravel - A PHP Framework For Web Artisans
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment