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

时间:2017-06-25 08:37:35

标签: php html .htaccess

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

长话短说我建立了一个网站,在根目录中有一个名为" inc"在这个文件夹里面我有header.php和footer.php。每当我访问我的网站http://www.codebox.co.nz/时,index.php下载,我无法弄清楚原因:( - 在我的.htaccess文件中我有这段代码。

RewriteEngine on

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

AddHandler php5-script .php .html .htm

该网站包含其他.php页面的子文件夹,我尝试做的只是使用网站相对PHP,因此无论子目录是什么,所有页面都包含header和footer.php。 .php页面在!

我真的迷失了这个,我联系了我的托管服务提供商,但他们一直告诉我检查我的PHP代码?

我感觉它是我的.htacccess文件。

此文件中的代码是这样的.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);
            ?>

0 个答案:

没有答案
相关问题