- 124 名前:nobodyさん [2012/06/26(火) 12:00:34.23 ID:WMfeevkP]
- -- test1.php --
class Test1 { } -- test2.php -- class Test2 extends Test1 { } -- index.php -- require_once 'test2.php'; require_once 'test1.php'; 【index.phpの出力結果】 Fatal error: Class 'Test1' not found クラス継承を行う場合は、先にその元クラスをインクルードする必要があるのでしょうか。 またはphp.iniでその設定があるのでしょうか。 (ローカルサーバだとエラーにはならないが、別のサーバだとエラーになります。)
|

|