Инсталация на PHPBB форуми

Всичко за извъндизайнерският профил на Вашият компютър
User avatar
staf
Шаман
Шаман
Posts: 4254
Joined: Sun Sep 25, 2005 10:14 pm
Answers: 9
Contact:

Post by staf » Tue Oct 11, 2005 6:14 pm

Много ти благодаря :) , ей сега ще пробвам какво ще стане

Admin
Site Admin
Site Admin
Posts: 5
Joined: Thu Jan 01, 1970 12:00 am
Answers: 224

Post by Admin » Tue Oct 11, 2005 6:16 pm

staf wrote:Много ти благодаря :) , ей сега ще пробвам какво ще стане
Ето нещо което трябва да е добро.

http://forums.bgdev.org/index.php?showt ... ледни+теми

User avatar
staf
Шаман
Шаман
Posts: 4254
Joined: Sun Sep 25, 2005 10:14 pm
Answers: 9
Contact:

Post by staf » Tue Oct 11, 2005 6:23 pm

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'staf'@'localhost' (using password: YES) in D:\Free\test.php on line 39

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\Free\test.php on line 45

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in D:\Free\test.php on line 46

Admin
Site Admin
Site Admin
Posts: 5
Joined: Thu Jan 01, 1970 12:00 am
Answers: 224

Post by Admin » Tue Oct 11, 2005 6:30 pm

staf wrote:Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'staf'@'localhost' (using password: YES) in D:\Free\test.php on line 39

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\Free\test.php on line 45

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in D:\Free\test.php on line 46

Ползвай този код.

http://forums.bgdev.org/index.php?showt ... ледни+теми

Но попълни това в кода:

Code: Select all

//MySQL server adress 

$host=""; 



//Username 

$user=""; 



//Password 

$pass=""; 



//Database 

$db=""; 

на host пиши localhost .

User avatar
staf
Шаман
Шаман
Posts: 4254
Joined: Sun Sep 25, 2005 10:14 pm
Answers: 9
Contact:

Post by staf » Tue Oct 11, 2005 6:33 pm

//Username

$user="";



//Password

$pass="";

на ника и паролата на форума ли да пиша или да пиша root

Admin
Site Admin
Site Admin
Posts: 5
Joined: Thu Jan 01, 1970 12:00 am
Answers: 224

Post by Admin » Tue Oct 11, 2005 7:14 pm

staf wrote: //Username

$user="";



//Password

$pass="";

на ника и паролата на форума ли да пиша или да пиша root
Това са данните за базата данни.
Ти при инстала на форума какво писа?
root
без парола така ли?

Ако е така то пише и тук:

Code: Select all

//Username 

$user="root"; 



//Password 

$pass=""; 

User avatar
staf
Шаман
Шаман
Posts: 4254
Joined: Sun Sep 25, 2005 10:14 pm
Answers: 9
Contact:

Post by staf » Tue Oct 11, 2005 7:35 pm

Code: Select all

<?php

/*** phpbb система за последни теми ***/

/** Моля променете по-долните параметри ***/

//MySQL сървър хост

$adress="localhost";

//Потребител

$username="root";
//Парола

$password="";



//База данни

$database="phpbb";



//Таблица

$table="phpbb_topics,phpbb_categories";

//Колко броя последни теми да показва?

$limit="10";

// Край на връзката


//Не редактирай нищо

$connection=mysql_connect&#40;$adress, $username, $password&#41;;

$database=mysql_select_db&#40;$database&#41;;

$query="select * from $table order by topic_time desc limit 0,$limit";

$result=mysql_query&#40;$query, $connection&#41;;
while &#40;$row=mysql_fetch_row&#40;$result&#41;&#41;
&#123;
echo "<a href='http&#58;//www.domain.com/viewtopic.php?t=$row&#91;0&#93;' target='_blank'>$row&#91;14&#93;&#58; $row&#91;2&#93;&#40;$row&#91;6&#93;&#41;</a><br>";
&#125;
?>
http://84.242.156.50/test.php И ми отваря http://www.domain.com/viewtopic.php?t=1

Admin
Site Admin
Site Admin
Posts: 5
Joined: Thu Jan 01, 1970 12:00 am
Answers: 224

Post by Admin » Tue Oct 11, 2005 7:53 pm

Този ред :

Code: Select all

echo "<a href='http&#58;//www.domain.com/viewtopic.php?t=$row&#91;0&#93;' target='_blank'>$row&#91;14&#93;&#58; $row&#91;2&#93;&#40;$row&#91;6&#93;&#41;</a><br>"; 
го направи така:

Code: Select all

echo "<a href='http&#58;//84.242.156.50/phpBB2/viewtopic.php?t=$row&#91;0&#93;' target='_blank'>$row&#91;14&#93;&#58; $row&#91;2&#93;&#40;$row&#91;6&#93;&#41;</a><br>";

Пиши кво е станало защото няма как да го тествам.

User avatar
staf
Шаман
Шаман
Posts: 4254
Joined: Sun Sep 25, 2005 10:14 pm
Answers: 9
Contact:

Post by staf » Tue Oct 11, 2005 7:58 pm

Parse error: syntax error, unexpected $end in D:\Free\test.php on line 48

Admin
Site Admin
Site Admin
Posts: 5
Joined: Thu Jan 01, 1970 12:00 am
Answers: 224

Post by Admin » Tue Oct 11, 2005 8:05 pm

Code: Select all

echo "<a href='http&#58;//84.242.156.50/phpBB2/viewtopic.php?t=$row&#91;0&#93; target=_blank>$row&#91;14&#93;&#58; $row&#91;2&#93;&#40;$row&#91;6&#93;&#41;</a><br>"; 
А така?

Post Reply