[PHP-users 20944]コマンドライン版での相対パスのinclude

naoki kishida kishida @ fk.urban.ne.jp
2004年 3月 24日 (水) 03:34:05 JST


きしだです

PHPのバージョンを4.2.2から4.3.4へ上げたのですが、それまではできていた、
コマンドライン版での相対パスのincludeができなくなっていました。

つまり
  include ("../lib/common.php");
のような指定が今までどおりには動かなくなっています。
もちろん、スクリプトファイルから見た../lib/common.phpというファイルは存
在しています。
また、Apacheモジュールの方では、今までどおり相対パスでincludeしたときに
スクリプトからの相対パスでファイルを探してくれています。

これは、どういう仕様になっているのでしょうか?


php.iniにinclude_pathは指定していません。
includeの部分では、次のような警告が出ています。

Warning: main(../lib/common.php): failed to open stream: No such file or directory in /home/kishida/script/test.php on line 15
Warning: main(): Failed opening '../lib/common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/kishida/script/test.php on line 15

----
岸田 哉生(きしだ なおき)
	email:kishida @ fk.urban.ne.jp
	http://www.fk.urban.ne.jp/home/kishida/



PHP-users メーリングリストの案内