現在の位置: ホーム> 関数カテゴリ一覧> 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を変更する他の方法を復元しないことに注意してください。

類似の関数
  • 定義されたすべての定数の連想配列を返します get_defined_constants

    get_defined_constants

    定義されたすべての定数の連想配列を返しま
  • 現在のリソース使用状況を取得します getrusage

    getrusage

    現在のリソース使用状況を取得します
  • 添付のINIディレクトリから解析された.iniファイルのリストを返します php_ini_scanned_files

    php_ini_scanned_files

    添付のINIディレクトリから解析された.
  • MAGIC_QUOTES_GPCの現在の構成設定を取得します。この関数は、PHP 7.4.0以降に非推奨されています。この機能に頼らないことを強くお勧めします。 get_magic_quotes_gpc

    get_magic_quotes_gpc

    MAGIC_QUOTES_GPCの現在の
  • 環境変数の値を取得します getenv

    getenv

    環境変数の値を取得します
  • Zend Engineの現在のバージョンを取得します zend_version

    zend_version

    ZendEngineの現在のバージョンを
  • ini shorthand構文から解釈されたサイズを取得します ini_parse_quantity

    ini_parse_quantity

    inishorthand構文から解釈され
  • PHPに割り当てられたメモリの量を返します memory_get_usage

    memory_get_usage

    PHPに割り当てられたメモリの量を返しま
人気記事(にんききじ)