PHP 7のapache/ubuntuのSlimアプリケーションでインクルードパスに問題があります。私のapp/routesのインデックスページで、サブディレクトリにあるファイルをインクルードしようとすると、私は自分のapacheのerror.logに、次の取得が、パスは私には正しいようだ:SlimアプリケーションのUbuntuにPHPの警告を含める
はPHP Warning: include(myapp/production/include.php): failed to open stream: No such file or directory in /var/www/html/index.php on line 33
PHP Warning: include(): Failed opening 'myapp/production/include.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/index.php on line 33
ディレクトリ構造がある:index.phpの中
/var/www/html/
├── index.php
├── myapp/
│ ├── vendor/
│ └── production/
│ └── include.php
該当する行33:
include ('myapp/production/include.php');
ファイル/ディレクトリのアクセス許可に関連する問題がありますか?私はかなりLinuxのサーバー上でWebアプリケーションを設定することを知っていた。どんな助けもありがとう。
EDIT:
私は(のindex.phpと同じ)メインのウェブディレクトリ内のファイル、およびその作業を行う含んを含めるテストを追加しました。
はい、私は 'test.php'ファイルを' index.php'と同じフォルダに作成して 'include'しようとすると、権限があるかどうかを確認する必要があります。アクセス許可の有無について – smarber
Webルートにテストインクルードを試しましたが、動作します。 – Marcatectura
その後、パスが間違っているかパーミッションが不足しています – smarber