2014-02-26 108 views
-4

我必須在網站的頭部分輸入一些代碼。我知道我需要在index.php文件中插入代碼。我正在使用joomla 3.1。我找到了/home/templates/template-name/index.php文件。問題是這個文件不是它應該的。我在哪裏必須在index.php中插入代碼?

我看不到頭部或身體或任何頁面應該有的東西。任何人都可以幫助找到該文件?

這是從文件中的代碼:

<?php 
// No direct access. 
defined('_JEXEC') or die; 
if(!defined('DS')){ 
    define('DS',DIRECTORY_SEPARATOR); 
    } 
    // Add JavaScript Frameworks 
    JHtml::_('bootstrap.framework'); 

// enable showing errors in PHP 
ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT); 
ini_set('display_errors','On'); 
// include framework classes and files 
require_once('lib/gk.framework.php'); 
require_once('lib/framework/gk.const.php'); 
// run the framework 
$tpl = new GKTemplate($this, $GK_TEMPLATE_MODULE_STYLES); 

// EOF 
+0

爲什麼你會在那裏設置錯誤報告而不是通過全局配置?另外我真的建議使用API​​來添加庫,如果這是你需要的。你是什​​麼意思的「the」index.php文件?你的代碼庫中有幾個index.php文件。 – Elin

回答

0

模板(包括頭部和身體)可能會被

$tpl = new GKTemplate($this, $GK_TEMPLATE_MODULE_STYLES); 

生成通過google搜索GKTemplate我發現了一些論壇上建議,檢查/layouts/GKTemplate.php在模板文件夾。

+0

謝謝。這是你在/ layouts/gktamplate中說的。 – Nefton

相關問題