mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Treat IP as 127.0.0.1 when called on the CLI
This commit is contained in:
parent
209ccd148a
commit
f983d9a496
1 changed files with 5 additions and 0 deletions
|
|
@ -66,6 +66,11 @@ elseif (isset($_SERVER['REMOTE_ADDR']) && @inet_pton($_SERVER['REMOTE_ADDR']) !=
|
||||||
define('RX_CLIENT_IP_VERSION', 6);
|
define('RX_CLIENT_IP_VERSION', 6);
|
||||||
define('RX_CLIENT_IP', $_SERVER['REMOTE_ADDR']);
|
define('RX_CLIENT_IP', $_SERVER['REMOTE_ADDR']);
|
||||||
}
|
}
|
||||||
|
elseif (PHP_SAPI === 'cli')
|
||||||
|
{
|
||||||
|
define('RX_CLIENT_IP_VERSION', 4);
|
||||||
|
define('RX_CLIENT_IP', '127.0.0.1');
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
define('RX_CLIENT_IP_VERSION', 4);
|
define('RX_CLIENT_IP_VERSION', 4);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue