1
ini_get
をブロックしたいauto_prepend_file
の機能をブロックします。 私はdisable_functions
オプションで機能をブロックするのではなく、特定の値をブロックします。 これを行う方法はありますか?ini_get関数から特定の値をブロックする
ini_get
をブロックしたいauto_prepend_file
の機能をブロックします。 私はdisable_functions
オプションで機能をブロックするのではなく、特定の値をブロックします。 これを行う方法はありますか?ini_get関数から特定の値をブロックする
次のようにmod_ini_get.php
ファイルを作成し、uopz
拡張機能をインストールします。
<?php
uopz_set_return('ini_get', function ($k) {
if ($k === 'auto_prepend_file')
return var_export(ini_get($k), true) . " - modified";
return ini_get($k);
}, true);
auto_prepend_file
INIオプションを変更します。
auto_prepend_file=mod_ini_get.php
テストそれ:
var_dump(ini_get('auto_prepend_file'));
var_dump(ini_get('engine'));
サンプル出力を:
string(28) "'mod_ini_get.php' - modified"
bool(false)
AFAIK、PHPソースにパッチを当てなければ不可能です。 –
@RuslanOsmanovあなたはどういう意味ですか? –
私は、PHPのソースコードを変更し、独自のバージョンをコンパイルすることを意味します。 –