現在の位置: ホーム> 関数カテゴリ一覧> restore_include_path

restore_include_path

include_path構成オプションの値を復元します
名前:restore_include_path
カテゴリ:PHPオプションと情報
対応言語:php
一言説明:set_include_path()関数を使用してmodifiedのinclude_pathの値を回復する

関数名:restore_include_path()

関数の説明:この関数は、set_include_path()関数を使用して変更されたinclude_pathの値を復元するために使用されます。

関数の使用法:restore_include_path()関数はパラメーターを受け入れません。

サンプルコード:

 // 设置新的include_path set_include_path('/path/to/directory'); // 备份当前的include_path $backup = get_include_path(); // 修改include_path set_include_path('/another/path'); // 恢复之前的include_path restore_include_path(); // 输出恢复后的include_path echo get_include_path(); // 输出/path/to/directory

上記の例では、最初にset_include_path()関数を使用して新しいinclud_pathを設定します。次に、get_include_path()関数を使用して、current curringの値をバックアップしました。次に、set_include_path()関数を使用してinclude_pathを変更します。最後に、restore_include_path()関数を使用して、以前のバックアップ値にcontruce_pathを復元します。コードの最後の行はget_include_path()関数を使用して復元されたinclude_path値を出力して、回復が成功したかどうかを確認します。

restore_include_path()関数は、set_include_path()関数によって変更されたinclude_path値のみを復元し、include_pathを変更する他の方法を復元しないことに注意してください。

類似の関数
  • MAGIC_QUOTES_GPCの現在の構成設定を取得します。この関数は、PHP 7.4.0以降に非推奨されています。この機能に頼らないことを強くお勧めします。 get_magic_quotes_gpc

    get_magic_quotes_gpc

    MAGIC_QUOTES_GPCの現在の
  • 現在のPHPスクリプト所有者のGIDを取得します getmygid

    getmygid

    現在のPHPスクリプト所有者のGIDを取
  • WebサーバーとPHP間のインターフェイスタイプを返します php_sapi_name

    php_sapi_name

    WebサーバーとPHP間のインターフェイ
  • PHPによって割り当てられたピークメモリを返します memory_get_peak_usage

    memory_get_peak_usage

    PHPによって割り当てられたピークメモリ
  • PHPプロセスのIDを取得します getmypid

    getmypid

    PHPプロセスのIDを取得します
  • 構成オプションの値を復元します ini_restore

    ini_restore

    構成オプションの値を復元します
  • get_included_filesのエイリアス get_required_files

    get_required_files

    get_included_filesのエ
  • 構成オプションの値を設定します ini_set

    ini_set

    構成オプションの値を設定します
人気記事(にんききじ)