set_include_pathとは? わかりやすく解説

Weblio 辞書 > コンピュータ > PHP関数リファレンス > set_include_pathの意味・解説 

set_include_path

(PHP 4 >= 4.3.0, PHP 5)
set_include_path — include_path設定オプションをセットする

説明

string set_include_path ( string new_include_path )
スクリプトが動作する間の include_path設定オプション をセットします。成功時に元の include_pathの値を 返します。失敗するとFALSEを返します。
例 1743. set_include_path()の例
<?php
// PHP 4.3.0 で動作する
set_include_path('/inc');

// すべての PHP のバージョンで動作する
ini_set('include_path', '/inc');
?>


例 1744. include path を追加する
PATH_SEPARATOR 定数を利用することで、 オペレーティングシステムに依存せずに include path を追加する ことが可能です。
この例では、既存の include_path の最後に /usr/lib/pear を追加します。
<?php
$path = '/usr/lib/pear';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
?>


ini_set(), get_include_path(), restore_include_path(), include()も参照してください。


このページでは「PHP関数リファレンス」からset_include_pathを検索した結果を表示しています。
Weblioに収録されているすべての辞書からset_include_pathを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からset_include_pathを検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「set_include_path」の関連用語

set_include_pathのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



set_include_pathのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
PHP Documentation GroupPHP Documentation Group
Copyright © 1997 - 2024 by the PHP Documentation Group.

©2024 GRAS Group, Inc.RSS