relax "disabled functions" check
This commit is contained in:
parent
81a343dd56
commit
f6971892a3
|
|
@ -29,12 +29,16 @@ ini_set('display_errors', true);
|
||||||
file_put_contents($envPath, preg_replace('/APP_KEY\s*=\s*/', 'APP_KEY='.$key."\n\n", $envFile));
|
file_put_contents($envPath, preg_replace('/APP_KEY\s*=\s*/', 'APP_KEY='.$key."\n\n", $envFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty(ini_get('disable_functions'))) {
|
$requiredFunctions = ['symlink', 'readlink', 'putenv', 'realpath'];
|
||||||
die_with_utf8_encoding(
|
$disabledFunctions = preg_split('/,\s*/', ini_get('disable_functions'));
|
||||||
'[Error] Please don\'t disable any functions, which is specified in "php.ini" file.<br>'.
|
foreach ($requiredFunctions as $fn) {
|
||||||
'[错误] 请不要在 php.ini 中禁用任何函数。'.
|
if (in_array($fn, $disabledFunctions)) {
|
||||||
'<strong>我们不建议使用您使用宝塔等面板软件,因为容易引起兼容性问题。</strong>'
|
die_with_utf8_encoding(
|
||||||
);
|
'[Error] Please don\'t disable built-in function "'.$fn.'", which is specified in "php.ini" file.<br>'.
|
||||||
|
"[错误] 请不要在 php.ini 中禁用 $fn 函数。".
|
||||||
|
'<strong>我们不建议使用您使用宝塔等面板软件,因为容易引起兼容性问题。</strong>'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty(ini_get('open_basedir'))) {
|
if (!empty(ini_get('open_basedir'))) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user