我的网站www.codebox.co.nz下载index.php文件,而不是显示网站

我的网站www.codebox.co.nz下载index.php文件,而不是显示网站,php,html,.htaccess,Php,Html,.htaccess,大家好,希望一切都好! 我的网站www.codebox.co.nz似乎正在下载index.php,而不是显示该网站 长话短说,我建立了一个网站,在根目录中有一个名为“inc”的文件夹,在这个文件夹中我有header.php和footer.php。每次我访问我的站点时,index.php都会下载,我不知道为什么:(-在我的.htaccess文件中,我有这个代码 RewriteEngine on RewriteRule ^(.*)\.html$ $1.php [nc] AddHandler ph

大家好,希望一切都好! 我的网站www.codebox.co.nz似乎正在下载index.php,而不是显示该网站

长话短说,我建立了一个网站,在根目录中有一个名为“inc”的文件夹,在这个文件夹中我有header.php和footer.php。每次我访问我的站点时,index.php都会下载,我不知道为什么:(-在我的
.htaccess
文件中,我有这个代码

RewriteEngine on

RewriteRule ^(.*)\.html$ $1.php [nc]

AddHandler php5-script .php .html .htm
该站点中有其他.php页面的子文件夹,我所要做的就是使用site relative php,这样所有页面上都包含header和footer.php,而不管这些页面的子目录是什么.php页面

我真的很迷茫,我已经联系了我的主机提供商,但他们一直告诉我检查我的PHP代码

我感觉这是我的
.htaccess
文件

该文件中的代码就在那里,因此.php会根据客户机的请求输出为.html

你能给我的任何信息都会很棒

                <?php 
               $path = $_SERVER['DOCUMENT_ROOT'];
               $path .= "/inc/header.php";
               include_once($path);
            ?>

            <div class="pageTopic">
              <h1>Welcome to Aaron Whiteman Monumental Masonry</h1>
            </div>

            <div id="myCarousel" class="carousel slide carousel-fade" data-ride="carousel" data-interval="5000">
              <!-- Indicators -->
              <ol class="carousel-indicators">
                <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                <li data-target="#myCarousel" data-slide-to="1"></li>
                <li data-target="#myCarousel" data-slide-to="2"></li>
              </ol>

              <!-- Wrapper for slides -->
              <div class="carousel-inner">
                <div class="item active">
                  <img src="slideshowPics/slideshow1.jpg" alt="Aaron Whiteman Monumental Masonry">
                </div>

                <div class="item">
                  <img src="slideshowPics/slideshow2.jpg" alt="Aaron Whiteman Monumental Masonry">
                </div>

                <div class="item">
                  <img src="slideshowPics/slideshow3.jpg" alt="Aaron Whiteman Monumental Masonry">
                </div>


                <div class="item">
                  <img src="slideshowPics/slideshow4.jpg" alt="Aaron Whiteman Monumental Masonry">
                </div>
              </div>

              <!-- Left and right controls -->
              <a class="left carousel-control" href="#myCarousel" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left"></span>
                <span class="sr-only">Previous</span>
              </a>
              <a class="right carousel-control" href="#myCarousel" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right"></span>
                <span class="sr-only">Next</span>
              </a>
            </div>

            <section class="light">
              <div class="row">
                <div class="col-lg-12">
                  <p>A memorial set in stone is a lasting way to pay respect to a loved one.</p>
                  <p>Working with families to create permanent memorials is our core business. Since 2003 we have been providing monumental masonry services to the Wellington region, and have gained an excellent reputation for our craftsmanship, innovation and attention to detail.</p>
                  <p>We create both traditional gravestones and innovative new memorials at our Upper Hutt premises. Also, we offer a full restoration and refurbishment service for graves, plaques and headstones. Using traditional techniques combined with the latest technology, we can tailor our services to meet your requirements, creating everlasting memorials that will stand the test of time.</p>
                </div>
              </div>
            </section>

            <?php 
               $path = $_SERVER['DOCUMENT_ROOT'];
               $path .= "/inc/footer.php";
               include_once($path);
            ?>

欢迎来到Aaron Whitman纪念性建筑
  • 石头上的纪念物是一种向所爱的人表达敬意的持久方式

    我们的核心业务是与家人一起建造永久纪念碑。自2003年以来,我们一直为惠灵顿地区提供纪念性的砖石服务,并因我们的工艺、创新和对细节的关注而赢得了良好的声誉

    我们在上赫特人的场所创建传统墓碑和创新的新纪念物。此外,我们还为墓碑、牌匾和墓碑提供全面的修复和翻新服务。使用传统技术结合最新技术,我们可以定制我们的服务以满足您的要求,创建永久的纪念物t将经受时间的考验


    欢迎使用Stack Overflow!有关专业服务器或网络相关基础设施管理的问题与Stack Overflow无关,除非这些问题直接涉及编程或编程工具。您可以获得有关帮助。这可能很有用-您的Web服务器的可能副本未执行php文件。哪个Web服务器您正在使用的服务器。