PHP application index.PHP在浏览器中不工作

PHP application index.PHP在浏览器中不工作,php,dockerfile,Php,Dockerfile,我已经在docker容器中部署了一个php代码,但它不起作用,并且在浏览器中出现以下错误 **浏览器中出现错误:** 但是,如果我在同一代码中复制一个简单的“hello world”index.php,那么就可以了 同样的php代码在IIS上运行良好,但现在我正在linux docker容器上尝试。 这是我的Dockerfile COPY . /var/www/html COPY vhost.conf /etc/apache2/sites-available/000-default.conf E

我已经在docker容器中部署了一个php代码,但它不起作用,并且在浏览器中出现以下错误

**浏览器中出现错误:**

但是,如果我在同一代码中复制一个简单的“hello world”index.php,那么就可以了

同样的php代码在IIS上运行良好,但现在我正在linux docker容器上尝试。 这是我的Dockerfile

COPY . /var/www/html
COPY vhost.conf /etc/apache2/sites-available/000-default.conf
EXPOSE 80
#EXPOSE 8931
RUN chown -R www-data:www-data /var/www/html
ENV APACHE_RUN_USER=www-data \
    APACHE_RUN_GROUP=www-data
这是我的vhost.conf文件

    DocumentRoot /var/www/html
    <Directory "/var/www/html">
        AllowOverride all
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
DocumentRoot/var/www/html
允许超越所有
要求所有授权
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合

请告知可能出现的问题

看起来php代码是为在windows平台上运行而编写的,我需要根据Linux对其进行修改。这肯定会解决它的问题

问:为什么index.php要查找
”//include//basePage.php
(带双斜杠)?这似乎不对。问:您的Docker映像中是否存在basePage.php?其中?index.php有一个basePage.php的引用
include_once(include_DIR.“basePage.php”)
和容器内的路径位置如下:
/var/www/html/index.php/var/www/html/include/basePage.php
I在index.html中更新了下面的路径,li在index.html中更新了下面的路径``define(“include\u DIR”,$\u SERVER['APPL\u PHYSICAL\u path'].//include//;”定义($服务器['APPL\u物理路径].“/var/www/html/INCLUDE/”);`````现在我在浏览器中遇到了不同的错误:``不推荐使用:非静态方法Logger::logError()不应在第29行/var/www/html/include/errorHandler.php中静态调用2:filemtime():stat在\\USDFW14AS159V\GHRMData\data\ghrmfiles\\intros\JP-COL\01\u guideline.pdf中失败:``对不起,我在上面的评论中指的是index.php
    DocumentRoot /var/www/html
    <Directory "/var/www/html">
        AllowOverride all
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>