相対パスで指定する書き方
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once(dirname(__FILE__).'/common.php'); |
理由
require_onceしたファイル先でまたrequire_onceしてると、実行されているファイルから起点に相対パスを解釈する為、ファイルから見た相対パスで書く場合は上記のように書く必要がある。
参考(ありがとうございました!)
コメント