Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Pytanie


StuSto

Rekomendowane odpowiedzi

Opublikowano

Robie prywatny server dla sb na loclahoscie i gdy laduje wszystko to wyskakuje taki blad:

Zaregistrovani ucty: 
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'UZIVATELDB'@'localhost' (using password: YES)' in D:\xampp\htdocs\usercount.php:2 Stack trace: #0 D:\xampp\htdocs\usercount.php(2): PDO->__construct('mysql:userhost=...', 'UZIVATELDB', 'HESLO') #1 D:\xampp\htdocs\index.php(71): include('D:\\xampp\\htdocs...') #2 {main} thrown in D:\xampp\htdocs\usercount.php on line 2

w index.php mam taki tekst:


<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<![endif]-->
<META http-equiv="expires" content="0">
<META http-equiv="cache-control" content="no-cache">
<META http-equiv="pragma" content="no-cache">
<META name="author" content="Playa Games GmbH">
<META name="publisher" content="Playa Games GmbH">
<META name="copyright"
	content="Copyright 2013 Playa Games GmbH. All Rights reserved.">
<META name="keywords" content="browser game">
<META name="description" content="The fun Shakes & Fidget browser game">
<META name="page-topic" content="Computer/Software/Games">
<META name="audience" content="All">
<META name="robots" content="index, follow">
<link rel="shortcut icon" href="./res/favicon.ico" type="image/x-icon" />
<style type="text/css">
html,body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%
}

.black_overlay {
	display: block;
	position: absolute;
	top: 0%;
	left: 0%;
	width: 100%;
	height: 100%;
	background-color: black;
	z-index: 1001;
	-moz-opacity: 0.8;
	opacity: .80;
	filter: alpha(opacity =   80);
}

.white_content {
	border-radius: 55px;
	text-align: center;
	position: absolute;
	top: 25%;
	left: 25%;
	width: 50%;
	height: 50%;
	padding: 5px;
	border: 16px solid orange;
	background-color: white;
	z-index: 1002;
	overflow: auto;
	margin: auto;
}
</style>

</head>
<body bgcolor="#000000" left="0" top="0" topmargin="0" leftmargin="0"
	scroll="no" id="body">
	<div id="light" class="white_content">
		<div style="position:relative;widht:100%;height:100%; overflow: hidden;">
	
	
		<!-- <h1>Vitejte</h1>
<p style="color: rgb(25,225,25);">Posledni Update: 2014.03.08</p>


 -->
			<h2>Text</h2>
			<p>Text</p>
			<p>Text</p>
			<p>Zaregistrovani ucty: <?php include "usercount.php"?></p>	
			<div style="position:absolute;bottom:0px;width:100%;">
				<div id="ticker" style="">ticker</div>
			</div>
		</div>
	</div>
	<div id="fade" class="black_overlay"></div>

	<script language="JavaScript" type="text/javascript">

// window.onload = function(){

var ticker = document.getElementById("ticker");

function tick(counter){
	if(counter > 0){
		ticker.innerHTML = counter + "...";
		counter--;
		setTimeout(function(){tick(counter)},1000);
	}else{
		ticker.innerHTML = "<a href=\"javascript:void(0)\" onclick=\"document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'\">Ukončit</a>"; 
	}
}
tick(5);
	
// }

// <!--
// -----------------------------------------------------------------------------
// Globals
var sociallinks = {"sfgame":{"facebook":"https:\/\/www.facebook.com\/pages\/Shakes-Fidget-The-Game\/107431265996255"}};

var swfwidth = '100%';
var swfheight = '100%';
var swfquality = 'best';
var swfscale = 'showAll';
var project = 'sfgame';
var movie = 'http://localhost/res/sfgame529';
var bgimage = 'http://localhost/background.jpg';
var message1 = 'Shakes & Fidget wymaga aplikacji Adobe Flash';
var message2 = 'Zainstaluj Flash teraz!';
var servername = 'shakes.hmhost.pl';
var branding_url = '';
var country = 'pl';
var serverid = 's1';
var strings = {};
var flimmerkistePoll = 300;
var moshid = 'hash=07903051fed624032a806770dc9171bc&time=1387449398';

var isIframe = false;
try{
  if (window.location != window.parent.location){
    isIframe = true; 
  }
} catch(e){
}

// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 124;
// -----------------------------------------------------------------------------
strings["brandengage.no_offers"] = 'Obecnie nie są dostępne żadne oferty.';
// -->
</script>
	<script src="res/js/thegame.js?version=25" type="text/javascript"></script>
	<noscript>
		<style type="text/css">
body {
	background: url(http://localhost/background.jpg);
	background-repeat: no-repeat;
	background-position: top center;
	background-color: #000000;
}

a:link {
	text-decoration: none;
	color: #ffd9aa;
}

a:visited {
	text-decoration: none;
	color: #ffd9aa;
}

a:hover {
	text-decoration: underline;
	color: #ffd9aa;
}

a:active {
	text-decoration: none;
	color: #ffd9aa;
}

a:focus {
	text-decoration: none;
	color: #ffd9aa;
}
</style>
		<table align="center" width="550px"
			style="font-family: Tahoma, Arial, Helvetica, sans-serif; color: #FFFFFF;">
			<tr>
				<td><BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR>
					<BR> <BR> <BR> <BR> <BR> <B>Shakes & Fidget wymaga aplikacji Adobe
						Flash: <A href="http://www.adobe.com/go/getflashplayer/">Zainstaluj
							Flash teraz!</A>
				</B></td>
			</tr>
		</table>

	</noscript>
	<iframe id="maif" name="maif" src="" width="0" height="0"
		style="position: absolute; left: 0; top: 0; border: 0 none"></iframe>
	<script type="text/javascript">
function default_phandler(action, cid, playerid, paramObj, paramObjCreate)
{
// 	document.getElementById("maif").src="marketing/map.php?a="+action+"&b="+cid+"&c="+playerid+"&d=1&e=52&f=eJxLtDKwqq4FAAZPAf4%3D&r=1387449398.6948";
}
default_phandler("regStart", "", 0, 0, 0);
</script>
</body>
</html>

A w usercount.php taki:

<?php 
$db = new PDO ( 'mysql:userhost=VASEIP;dbname=NAZVUDB;charset=utf8', 'UZIVATELDB', 'HESLO');
$qry = $db -> prepare("SELECT Count(*) AS c FROM user_data");
$qry -> execute();
echo ($qry -> fetchAll()[0]['c']);
?>

Co jest źle daje like!

Opublikowano

Pomogło jeszcze amm pytanie czemu jak próbuje sie zarejestrowac to jak klikne rejestruj to pisze ze nie mam polaczenia z internetem?

Opublikowano

Nic nie dalo

 

Jak sie rejestruje to wyskakuje:

BŁĄD: Rejestracja nie powiodła się prosze sprawdzic imie postaci i haslo
Opublikowano

@r ew. czy ktos ma na 100% dzialajace pliki serverowe na localhost ? Patrzyłem te na forum ale nie umiem ich wgrać daje like

Opublikowano

Korzystałem z jego tutów ale w pierwszym odcinku:


nie ma 2 naprawc (linki sie zepsuly ) przez co gra mi sie bugowala te takie niebieskie smoki po lewej i nic po za tym

Znalazłem 2 poradnik
 


Nowe pliki podobno, dam znać potem!

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...