This commit is contained in:
13
app/Helpers/cron_helper.php
Normal file
13
app/Helpers/cron_helper.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('get_linux_hostname')) {
|
||||
/**
|
||||
* hostname을 읽어옴... $_SERVER['HOSTNAME']을 대신해서 사용하기 위함.
|
||||
*/
|
||||
function get_linux_hostname()
|
||||
{
|
||||
preg_match('/HOSTNAME=(.*)/', file_get_contents('/etc/sysconfig/network'), $network);
|
||||
list($key, $hostname) = explode('=', $network[0]);
|
||||
return $hostname;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user