[問題] 推薦網站出現錯誤(已解決)

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
黑風凱特
星球公民
星球公民
文章: 267
註冊時間: 2004-12-13 22:12
來自: 台灣台北
聯繫:

[問題] 推薦網站出現錯誤(已解決)

文章 黑風凱特 »

我爬了文

點我

照上面的安裝後,進首頁出現下面的文字
Parse error: parse error, unexpected T_VARIABLE in /home/tssimon/public_html/phpbb/index.php on line 31
我重新照說明上的做法重新修改INDEX.PHP五次了~還是一樣~

如果重新上傳之前未修改的檔就可以確實進入~但換成修改的就不行~ :-|
我的網站 : http://www.starssimon.toyspa.net/phpbb/index.php
PHP版本 : 2.0.11
網路空間 : http://www.serverzoo.com/
現在網頁我把INDEX還原成之前備份的了,不過下方出現無法顯示區塊~

如果照說明的修改INDEX上傳則會出現\r

Parse error: parse error, unexpected T_VARIABLE in /home/tssimon/public_html/phpbb/index.php on line 31
最後由 黑風凱特 於 2005-01-26 19:43 編輯,總共編輯了 1 次。
圖檔
頭像
赤影
星球公民
星球公民
文章: 40
註冊時間: 2005-01-12 17:35

文章 赤影 »

我安裝成功喔!你查一查index.php內有沒有什麼錯誤,例如可能:
1.欠了","
2.複製錯方向,上下掉亂了
3.欠了"{" / "}"
4.欠了開新行!

這是我常常錯的地方~
歡迎加入[CrazyKill]
論壇網址:
http://free3.e-168.cn/crazykill/phpBB2/index.php
若想交換連結請到上面論壇網址內發表
黑風凱特
星球公民
星球公民
文章: 267
註冊時間: 2004-12-13 22:12
來自: 台灣台北
聯繫:

文章 黑風凱特 »

index.php我重新裝了很多次,看了您的回覆後我又重裝了一次~

還是一樣~>"<!
圖檔
黑風凱特
星球公民
星球公民
文章: 267
註冊時間: 2004-12-13 22:12
來自: 台灣台北
聯繫:

文章 黑風凱特 »

請問這個程式碼有規定放在哪嗎??還是在該文件中任一處都行??

我在猜會不會是這個放錯地方~~

導致index.php出錯~ :-(

代碼: 選擇全部


# 
#-----[ ACTION: OPEN  ]------------------------------------------ 
# 

language/lang_chinese_traditional_taiwan/lang_main.php

# 
#-----[ ACTION: ADD ]------------------------------------------ 
# 

// Related links
$lang['Site_links'] = "推薦網站";
圖檔
小西
竹貓忠實會員
竹貓忠實會員
文章: 460
註冊時間: 2004-11-19 22:29
來自: 超可愛聲音

文章 小西 »

// Related links
$lang['Site_links'] = "推薦網站";
放在lang_main.php任何一個地方\r

錯誤應該不是因為這個..
ACG自唱:分貝網存放區 (192kbps) ;NICO存放區 (320kbps)
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

把錯誤程式碼的前後幾行貼出來會比較快~
謝絕所有私人訊息詢問外掛相關問題
有問題請直接於版上發表, 集思廣議絕對比專挑特定人士詢問來的好

竹貓禁止發表含破解相關的軟體, 違者砍文
不要跟我講別的地方都可以發, 為什麼竹貓就不行
免費不等於破解, 傻傻的搞不清楚
黑風凱特
星球公民
星球公民
文章: 267
註冊時間: 2004-12-13 22:12
來自: 台灣台北
聯繫:

文章 黑風凱特 »

太長了~~我只貼這樣\r

phpbb/index.php

代碼: 選擇全部

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . "includes/links_constants.$phpEx"); Links_MOD
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;
\r
if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
	$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
	$mark_read = '';
}

//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
	if( $userdata['session_logged_in'] )
	{
		setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
	}

	$template->assign_vars(array(
		"META" => '<meta http-equiv="refresh" content="3;url='  .append_sid("index.$phpEx") . '">')
	);

	$message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');

	message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
	$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
	$l_total_post_s = $lang['Posted_article_total'];
}
else
{
	$l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
	$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
	$l_total_user_s = $lang['Registered_user_total'];
}
else
{
	$l_total_user_s = $lang['Registered_users_total'];
}


//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
	FROM " . CATEGORIES_TABLE . " c 
	ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

$category_rows = array();
while( $category_rows[] = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);

if( ( $total_categories = count($category_rows) ) )
{
	//
	// Define appropriate SQL
	//
	switch(SQL_LAYER)
	{
		case 'postgresql':
			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 
				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
				WHERE p.post_id = f.forum_last_post_id 
					AND u.user_id = p.poster_id  
					UNION (
						SELECT f.*, NULL, NULL, NULL, NULL
						FROM " . FORUMS_TABLE . " f
						WHERE NOT EXISTS (
							SELECT p.post_time
							FROM " . POSTS_TABLE . " p
							WHERE p.post_id = f.forum_last_post_id  
						)
					)
					ORDER BY cat_id, forum_order";
			break;

		case 'oracle':
			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 
				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
				WHERE p.post_id = f.forum_last_post_id(+)
					AND u.user_id = p.poster_id(+)
				ORDER BY f.cat_id, f.forum_order";
			break;
圖檔
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

黑風凱特 寫:太長了~~我只貼這樣\r

phpbb/index.php

代碼: 選擇全部

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . "includes/links_constants.$phpEx"); [color=blue]Links_MOD[/color]
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
問題就出在藍色標示的地方..
原本應該是 // Links_MOD 吧?
因為少了 // 註解~所以剖析錯誤
黑風凱特
星球公民
星球公民
文章: 267
註冊時間: 2004-12-13 22:12
來自: 台灣台北
聯繫:

文章 黑風凱特 »

成功了~

原來是安裝包裡好像沒加上~

我照論壇上面的就成功了~

謝謝幫忙~
圖檔
主題已鎖定

回到「外掛問題討論」