GeRik Posted June 29, 2009 Report Share Posted June 29, 2009 uzrakstiju vienalga balta lapa Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted June 29, 2009 Report Share Posted June 29, 2009 Pret "tabula rasa" cīnās ar divām lietām: error_reporting(E_ALL); ini_set('display_errors', 1); Quote Link to comment Share on other sites More sharing options...
cucumber Posted June 29, 2009 Report Share Posted June 29, 2009 neticu, ja pat mysql neko neatgrieztu, jabut divam izvaditam View->Page Source (Ctrl+U). Sourca divs ir? Quote Link to comment Share on other sites More sharing options...
GeRik Posted June 29, 2009 Report Share Posted June 29, 2009 (edited) Luk ko rada Source koda <div id="userlist"></div> un ka man ir tas vis uzrakstic <? define('WWW','www'); if (!defined('WWW')) { header('Location: http://'.$_SERVER['HTTP_HOST'].''); die(); } $link = mysql_connect($INFO['sql_host'],$INFO['sql_user'],$INFO['sql_pass']); mysql_query('use '.$INFO['sql_database'].';'); $page = '<div id="userlist">'; $result = mysql_query('select t1.id,t1.members_display_name,t2.avatar_location from '.$INFO['sql_tbl_prefix'].'members t1 join '.$INFO['sql_tbl_prefix'].'member_extra t2 on (t1.id = t2.id) limit 10;'); if (!empty($result)) { while ($r = mysql_fetch_array($result)) { $page .='<p> <a href="'.WWW.'forum/index.php?showuser='.$r[0].'"> <img class="avatar" src="'.WWW.'forum/uploads/'.$r[2].'" alt="'.$r[1].'" /> '.$r[1].'</a> </p>'; } } $page .='</div>'; echo $page; mysql_close($link); error_reporting(E_ALL); ini_set('display_errors', 1); ?> Edited June 29, 2009 by GeRik Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted June 29, 2009 Report Share Posted June 29, 2009 ini_set un error reportingu ieliec pašā sākumā. Quote Link to comment Share on other sites More sharing options...
cucumber Posted June 29, 2009 Report Share Posted June 29, 2009 (edited) gan jau mysql pieprasijuma kluda, vai pat konekciju neveido. ps. tas bus ilgi Edited June 29, 2009 by cucumber Quote Link to comment Share on other sites More sharing options...
GeRik Posted June 29, 2009 Report Share Posted June 29, 2009 (edited) Luk nu kas man sanaca tagad <?php error_reporting(E_ALL); ini_set('display_errors', 1); $sql_host = "localhost"; $sql_user = "root"; $sql_pass = ""; $sql_database = "forum"; define('WWW','www'); if (!defined('WWW')) { header('Location: http://'.$_SERVER['HTTP_HOST'].''); die(); } $link = mysql_connect($INFO['sql_host'],$INFO['sql_user'],$INFO['sql_pass']); mysql_query('use '.$INFO['sql_database'].';'); $page = '<div id="userlist">'; $result = mysql_query('select t1.id,t1.members_display_name,t2.avatar_location from '.$INFO['sql_tbl_prefix'].'members t1 join '.$INFO['sql_tbl_prefix'].'member_extra t2 on (t1.id = t2.id) limit 10;'); if (!empty($result)) { while ($r = mysql_fetch_array($result)) { $page .='<p> <a href="'.WWW.'forum/index.php?showuser='.$r[0].'"> <img class="avatar" src="'.WWW.'forum/uploads/'.$r[2].'" alt="'.$r[1].'" /> '.$r[1].'</a> </p>'; } } $page .='</div>'; echo $page; mysql_close($link); ?> un lapa rada tagad Notice: Undefined variable: INFO in C:\AppServ\www\lietotaji.php on line 11 Notice: Undefined variable: INFO in C:\AppServ\www\lietotaji.php on line 11 Notice: Undefined variable: INFO in C:\AppServ\www\lietotaji.php on line 11 Notice: Undefined variable: INFO in C:\AppServ\www\lietotaji.php on line 12 Notice: Undefined variable: INFO in C:\AppServ\www\lietotaji.php on line 15 Notice: Undefined variable: INFO in C:\AppServ\www\lietotaji.php on line 15 Edited June 29, 2009 by GeRik Quote Link to comment Share on other sites More sharing options...
cucumber Posted June 29, 2009 Report Share Posted June 29, 2009 nu ja tu esi uztaisijis vienkarhsu skriptu lietotaji.php, un neesi vinu sasaistisjis ar foruma globaliem mainigiem. Quote Link to comment Share on other sites More sharing options...
GeRik Posted June 29, 2009 Report Share Posted June 29, 2009 vari nedaudz vairak aprakstit ka to izdarit un ko tu ar to domaji Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted June 29, 2009 Report Share Posted June 29, 2009 GeRik, lūdzu parādi to vietu, kur esi definējis tādu $INFO masīvu un kur esi piešķīris dažādiem tā elementiem (kā, piemēram $INFO['sql_host']) vērtības. Quote Link to comment Share on other sites More sharing options...
cucumber Posted June 29, 2009 Report Share Posted June 29, 2009 (edited) GeRik, lūdzu parādi to vietu, kur esi definējis tādu $INFO masīvu un kur esi piešķīris dažādiem tā elementiem (kā, piemēram $INFO['sql_host']) vērtības. Tur jau ir tas joks, ka vinsh to skriptu laiz ka single failu. Nemak failus includet ari, isak sakot nodarbojas ar kombinatoriku. Edited June 29, 2009 by cucumber Quote Link to comment Share on other sites More sharing options...
GeRik Posted June 29, 2009 Report Share Posted June 29, 2009 Nodefineju itka vis aizgaja bet neuzrada visus memberus un ka vinjus varetu sadalit pa lapam ? Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted June 29, 2009 Report Share Posted June 29, 2009 LIMIT 10 - rūpējas par visu memberu neparādīšanu. Attiecībā par sadalīšanu vairākās lapās... Ir tēma ar nosaukumu: Neliels foruma tēmu apkopojums no arhīva sadaļas - tajā ir norādes uz šīs vajadzības atrisināšanu. Quote Link to comment Share on other sites More sharing options...
suport Posted June 29, 2009 Author Report Share Posted June 29, 2009 kads tad var vinju uzchinit vaj ne lidz galam un ejoshu ? Quote Link to comment Share on other sites More sharing options...
GeRik Posted June 29, 2009 Report Share Posted June 29, 2009 seko manam darbibam man vismaz sanaca uzchinit Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.