проблем с инклуд

mizarck

Registered
Здравейте,
допускам някаква грешка коята немога да я намеря
става дума за последните теми от phpbb

ето как съм го направил
posledni_temi.php
Код:
<?
include (config.php);
$link=mysql_connect($host, $user, $pass);
$db=mysql_select_db($db);
$query="select * from $table order by topic_time desc limit 0,$latest";
$result=mysql_query($query, $link);
while ($row=mysql_fetch_row($result)) {
echo "<a href='$linkf/viewtopic.php?t=$row[0]' target='_blank'>$row[2]</a><br>";
}
?>

config.php

Код:
$username2 = "admin";
$password2 = "admin";
$host= "localhost";
$user= "worldbg_root";
$pass= "*************";
$db= "worldbg_site";
$table= "phpbb_topics";
$latest= "10";
$linkf= "http://worldbg.info/forum";

давами следните грешки

Warning: main(configphp) [function.main]: failed to open stream: No such file or directory in /users/worldbg/public_html/posledni_temi.php on line 2

Warning: main() [function.include]: Failed opening 'configphp' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/cpanel/3rdparty/lib/php') in /users/worldbg/public_html/posledni_temi.php on line 2

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /users/worldbg/public_html/posledni_temi.php on line 3

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'root'@'localhost' (using password: NO) in /users/worldbg/public_html/posledni_temi.php on line 4

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /users/worldbg/public_html/posledni_temi.php on line 4

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /users/worldbg/public_html/posledni_temi.php on line 6

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /users/worldbg/public_html/posledni_temi.php on line 7

а ако направя файла posledni_temi така
Код:
<?
$username2 = "admin";
$password2 = "admin";
$host= "localhost";
$user= "worldbg_root";
$pass= "************";
$db= "worldbg_site";
$table= "phpbb_topics";
$latest= "10";
$linkf= "http://worldbg.info/forum";
$link=mysql_connect($host, $user, $pass);
$db=mysql_select_db($db);
$query="select * from $table order by topic_time desc limit 0,$latest";
$result=mysql_query($query, $link);
while ($row=mysql_fetch_row($result)) {
echo "<a href='$linkf/viewtopic.php?t=$row[0]' target='_blank'>$row[2]</a><br>";
}
?>
недава никакви грешки и си бачка
кажете ми каде ми е проблема че вече от няколко часа се мъча да разбера

Благодаря предварително
 

Admin

Registered
Код:
Warning: main() [function.include]: Failed opening 'configphp' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/cpanel/3rdparty/lib/php') in /users/worldbg/public_html/posledni_temi.php

Не може да открие файла configphp.

Така пише.

От самата грешка разбирам, че си объркал името на файла.
"Изял" си точката.

Промени го на config.php
 

Горе