par
Thomasfkc » 16 mai 2014, 21:41
Possibilité de voir ce que fait ta fonction ?
Car normalement passer des arguments par variables ne pose strictement aucun souci ...
En fait j'utilise un fichier class_knockout.php que j'
include au début de mon script. J'ai collé le code de ce fichier
ici.
Mon fichier principal, en entier, ressemble à ça :
<?php
include("config/database.php");
$requetetableau = $bdd->query("SELECT * FROM tableau_games");
$gamestableau = $requetetableau->fetchAll();
$match1 = $gamestableau[0]['matchid'];
$round1 = $gamestableau[0]['roundid'];
$scoreun1 = $gamestableau[0]['scoreone'];
$scoredeux1 = $gamestableau[0]['scoretwo'];
error_reporting(E_ALL);
include("classes/class.tableau.php");
$GDLIB_INSTALLED = (function_exists("gd_info")) ? true : false;
$competitors = array('Joueur 1','Joueur 2','Joueur 3','Joueur 4','Joueur 5','Joueur 6','Joueur 7','Joueur 8');
$KO = new KnockoutGD($competitors);
$bracket = $KO->getBracket();
$KO->setResByMatch(0, 1, 5, 0); // fonctionne
$KO->setResByMatch($matchindex, $roundid, $score1, $score2); // ne fonctionne pas alors que les 4 variables contiennent (1,1,8,4)
if ($GDLIB_INSTALLED) {
$im = $KO->getImage("Tournoi non commence");
header('Content-type: image/png');
imagepng($im);
}
?>
[quote="wng"]Possibilité de voir ce que fait ta fonction ?
Car normalement passer des arguments par variables ne pose strictement aucun souci ...[/quote]
En fait j'utilise un fichier class_knockout.php que j'[i]include[/i] au début de mon script. J'ai collé le code de ce fichier [url=http://pastebin.com/raw.php?i=TDymk1Ee]ici[/url].
Mon fichier principal, en entier, ressemble à ça :
[php]<?php
include("config/database.php");
$requetetableau = $bdd->query("SELECT * FROM tableau_games");
$gamestableau = $requetetableau->fetchAll();
$match1 = $gamestableau[0]['matchid'];
$round1 = $gamestableau[0]['roundid'];
$scoreun1 = $gamestableau[0]['scoreone'];
$scoredeux1 = $gamestableau[0]['scoretwo'];
error_reporting(E_ALL);
include("classes/class.tableau.php");
$GDLIB_INSTALLED = (function_exists("gd_info")) ? true : false;
$competitors = array('Joueur 1','Joueur 2','Joueur 3','Joueur 4','Joueur 5','Joueur 6','Joueur 7','Joueur 8');
$KO = new KnockoutGD($competitors);
$bracket = $KO->getBracket();
$KO->setResByMatch(0, 1, 5, 0); // fonctionne
$KO->setResByMatch($matchindex, $roundid, $score1, $score2); // ne fonctionne pas alors que les 4 variables contiennent (1,1,8,4)
if ($GDLIB_INSTALLED) {
$im = $KO->getImage("Tournoi non commence");
header('Content-type: image/png');
imagepng($im);
}
?>[/php]