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

類似の関数
  • PHP貢献者リストを印刷します phpcredits

    phpcredits

    PHP貢献者リストを印刷します
  • 拡張されたすべての関数名の配列を返します get_extension_funcs

    get_extension_funcs

    拡張されたすべての関数名の配列を返します
  • 構成オプションの値を設定します ini_set

    ini_set

    構成オプションの値を設定します
  • ロードされたphp.iniファイルへのパスを取得します php_ini_loaded_file

    php_ini_loaded_file

    ロードされたphp.iniファイルへのパ
  • ini_setのエイリアス ini_alter

    ini_alter

    ini_setのエイリアス
  • 定義されたすべての定数の連想配列を返します get_defined_constants

    get_defined_constants

    定義されたすべての定数の連想配列を返しま
  • 最後にページが変更されたときに入手してください getlastmod

    getlastmod

    最後にページが変更されたときに入手してく
  • 現在のPHPスクリプト所有者のGIDを取得します getmygid

    getmygid

    現在のPHPスクリプト所有者のGIDを取
人気記事(にんききじ)