mirror of
https://github.com/kmvan/x-prober.git
synced 2026-08-12 21:21:43 +08:00
adjust mb_*, str_* function name
This commit is contained in:
@@ -438,7 +438,7 @@ final class UtilsCpu
|
||||
return;
|
||||
}
|
||||
$line = $lines[0];
|
||||
if (0 !== mb_strpos($line, 'cpu ')) {
|
||||
if (0 !== strpos($line, 'cpu ')) {
|
||||
return;
|
||||
}
|
||||
$items = explode(' ', preg_replace('/\\s+/', ' ', $line));
|
||||
|
||||
@@ -7,7 +7,7 @@ final class UtilsLocation
|
||||
/**
|
||||
* Get IP location.
|
||||
*
|
||||
* @param [string] $ip
|
||||
* @param string $ip
|
||||
*
|
||||
* @return array|null $args
|
||||
* $args['country'] string Country, e.g, China
|
||||
@@ -37,7 +37,7 @@ final class UtilsLocation
|
||||
// get langcode from en-US,en;q=0.9,zh-CN;q=0.8,zh-TW;q=0.7,zh;q=0.6
|
||||
$langcode = '';
|
||||
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
if (str_contains($_SERVER['HTTP_ACCEPT_LANGUAGE'], ',')) {
|
||||
if (false!==strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], ',')) {
|
||||
$langcode = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], ','));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user