別々のディレクトリにあるいくつかの別々の Web サイトがあります。それらが共通に持っているインクルードについては、それらの残りが存在するルートディレクトリに存在しています。
user@hostname:/var/www$ ls
website_1 website_2 website_3 common_files
Zend パッケージをインクルードしたいので、インクルード パスがあります
ini_set("include_path", get_include_path() . ":/var/www/common_files/Zend");
require_once("Mail.php");
Mail.php
読み込みは問題ありませんが、どこかにこの行があります
require_once 'Zend/Mail/Transport/Abstract.php';
このエラーを与える
Warning: require_once(Zend/Mail/Transport/Abstract.php): failed to open stream: No such file or directory in var/www/common_files/Zend/Mail.php on line 26
そのため、php はインクルード パスのディレクトリ構造に再帰的に降りることはありません。Zend を各 Web サイトのディレクトリに移動したり、すべてのインクルードへのパスを綴ったりする必要がありますか?
ところで、アブストラクトは存在します:
user@host:/var/www/common_files/Zend$ tree -d
...
`-- Mail/Transport
|-- Mail/Transport/Abstract.php
|-- Mail/Transport/Exception.php
|-- Mail/Transport/Sendmail.php
`-- Mail/Transport/Smtp.php
9 directories, 32 files