ファイル構造(参考までに、私はLinuxサーバーを使用しています)
エラー:
Warning: include(./Setup/Setup.php) [function.include]: failed to open stream: No such file or directory in /home/content/22/10350022/html/templates/Home.php on line 1
Warning: include() [function.include]: Failed opening './Setup/Setup.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/22/10350022/html/templates/Home.php on line 1
このセットアップ ファイルにアクセスするために、いくつかの方法を試しました。
tried: include('/Setup/Setup.php') - same error
tried: __DIR__. '/Setup/Setup.php'
tried: $_SERVER [SITEROOT] and some other variations including the total path.
tried: Include = path ".:/Setup/Setup.php"
3 つすべてが同じエラーを生成しましたが、1 つの違いがありました。エラーに含まれるパス: /var/chroot/home/.../Setup/Setup.php
ここで何が起こっているのか理解するのに苦労しています。私はPHPにあまり精通していないので、相対パスと絶対パスをどのように最小化するか正確にはわかりません。
/Setup を参照するように指示したのに、/templates フォルダを参照するのはなぜですか?
ありがとう!