繁体   English   中英

Joomla index.php错误

[英]Joomla index.php BUG

我是joomla的一个新手,我继承了一个旧项目。 问题是我在xampp上本地复制了项目,当我访问该站点时,它会下载内容如下的文件:

<?php
/**
 * @package     Joomla.Site
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

// Set flag that this is a parent file.
define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);

if (file_exists(dirname(__FILE__) . '/defines.php')) {
    include_once dirname(__FILE__) . '/defines.php';
}

if (!defined('_JDEFINES')) {
    define('JPATH_BASE', dirname(__FILE__));
    require_once JPATH_BASE.'/includes/defines.php';
}

require_once JPATH_BASE.'/includes/framework.php';

// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;

// Instantiate the application.
$app = JFactory::getApplication('site');

// Initialise the application.
$app->initialise();

// Mark afterIntialise in the profiler.
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;

// Route the application.
$app->route();

// Mark afterRoute in the profiler.
JDEBUG ? $_PROFILER->mark('afterRoute') : null;

// Dispatch the application.
$app->dispatch();

// Mark afterDispatch in the profiler.
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;

// Render the application.
$app->render();

// Mark afterRender in the profiler.
JDEBUG ? $_PROFILER->mark('afterRender') : null;

// Return the response.
echo $app;

并且它不会加载索引页的内容。 我绝对不知道如何使它起作用,以及为什么它总是下载名称不同但内容相同的文件。 这是在线网站,有人可以帮助我吗? 谢谢

在这里查看结果: 在此处输入图片说明

这是index.html的内容:

<html xmlns="http://www.w3.org/1999/xhtml">
          <head>
            <title>Transylvania College</title>
            <meta http-equiv="refresh" content="0;URL='http://www.transylvania-college.ro/en'" />
        <script type="text/javascript">

          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-38799767-1']);
          _gaq.push(['_setDomainName', 'transylvania-college.ro']);
          _gaq.push(['_setAllowLinker', true]);
          _gaq.push(['_trackPageview']);

          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
          })();

        </script>
        <script type="text/javascript">
        var fb_param = {};
        fb_param.pixel_id = '6010688839388';
        fb_param.value = '0.00';
        fb_param.currency = 'USD';
        (function(){
          var fpw = document.createElement('script');
          fpw.async = true;
          fpw.src = '//connect.facebook.net/en_US/fp.js';
          var ref = document.getElementsByTagName('script')[0];
          ref.parentNode.insertBefore(fpw, ref);
        })();
        </script>
        <noscript>
          <img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/offsite_event.php?id=6010688839388&amp;value=0&amp;currency=USD" />
        </noscript>
          </head>
          <body>
            <p>Loading...</p>
          </body>
        </html>

在您的httpd.conf文件(Apache配置文件)中,添加以下内容:

AddType  application/x-httpd-php .php

这应该可以解决您的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM