Cerco file :)

Stato
Discussione chiusa ad ulteriori risposte.
Ma tu hai avuto dei problemi a crearla? Perché io arrivò al secondo step ma poi nn mi da l'accesso D:
 
R: Cerco file :)

Ricontrolla i dati che hai immesso e riprova

Inviato dal mio GT-I8160 con Tapatalk 2
 
Questo:




Warning: mysqli_connect() [function.mysqli-connect]: (42000/1044): Access denied for user 'lentiluca'@'localhost' to database ' my_lentiluca' in /membri/lentiluca/install/include/database.php on line 17


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /membri/lentiluca/install/include/database.php on line 17

- - - Updated - - -



Warning: mysqli_connect() [function.mysqli-connect]: (42000/1044): Access denied for user 'lentiluca'@'localhost' to database ' my_lentiluca' in /membri/lentiluca/install/include/database.php on line 17


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /membri/lentiluca/install/include/database.php on line 17
 
Scs potresti vedere tu? Nn ci capisco nientenXD




<?php
//////////////////////////////////////////////////////////////////////////////////////////////////////
// TRAVIANX //
// Only for advanced users, do not edit if you dont know what are you doing! //
// Made by: Dzoki & Dixie (TravianX) //
// - TravianX = Travian Clone Project - //
// DO NOT REMOVE COPYRIGHT NOTICE! //
//////////////////////////////////////////////////////////////////////////////////////////////////////


include("constant.php");


class MYSQLi_DB {


var $connection;


function MYSQLi_DB() {
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB) or die(mysqli_error());
}
function query($query) {
return $this->connection->query($query);
}


};


class MYSQL_DB {


var $connection;


function MYSQL_DB() {
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
}


function mysql_exec_batch ($p_query, $p_transaction_safe = true) {
if ($p_transaction_safe) {
$p_query = 'START TRANSACTION;' . $p_query . '; COMMIT;';
};
$query_split = preg_split ("/[;]+/", $p_query);
foreach ($query_split as $command_line) {
$command_line = trim($command_line);
if ($command_line != '') {
$query_result = mysql_query($command_line);
if ($query_result == 0) {
break;
};
};
};
return $query_result;
}


function query($query) {
return mysql_query($query, $this->connection);
}
};


if(DB_TYPE) {
$database = new MYSQLi_DB;
}
else {
$database = new MYSQL_DB;
}
?>
 
Adesso esce questo




Fatal error: Cannot redeclare class MYSQL_DB in /membri/lentiluca/install/include/database.php on line 25
 
function MYSQLi_DB() {
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB) or die(mysqli_error());
}
function query($query) {
return $this->connection->query($query);
}

modificalo in :

function MYSQL_DB() {
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB) or die(mysql_error());
}
function query($query) {
return $this->connection->query($query);
}
 
Ultima modifica:
SScusa cosa è che devo modificare???

facendo ciò che mi hai detto adesso mi viene questo invece

Fatal error: Cannot redeclare class MYSQL_DB in /membri/lentiluca/install/include/database.php on line 26

Cavolo da 25 passa a 26 .-.
 
Ultima modifica da un moderatore:
Scusa Dremal ma che senso ha quello che gli stai facendo fare? :O mysqli non è un errore di battitura, ma sta per mysql improved, cerca nella documentazione ufficiale se vuoi saperne di più...


Sent from my iPhone using Tapatalk 2
 
Poi non vedi che facendo come dici tu passi 4 parametri a mysql_connect ,che ne accetta solo 3, visto che non accetta il nome del db.


Sent from my iPhone using Tapatalk 2
 
Probabilmente tu usi una vecchia versione dei TravianZ che non usa mysqli


Sent from my iPhone using Tapatalk 2
 
Stato
Discussione chiusa ad ulteriori risposte.