salut à tous
Voici mon probleme : je tente de debugger un script pour un jeu en ligne mais je coince sur un élément (qui doit etre un detail)
voici les deux codes :
Dans le fichier 1, lignes qui nous interessent :
Code :
- // config check
- ob_start();
- require "secret/config.php";
- $config_content = ob_get_contents();
- ob_end_clean();
|
Dans le fichier config :
Code :
- <?php
- $dbusername = "monnom";
- $dbpassword = "xxx";
- $dbname = "monnom";
- $dbhost = "localhost";
- $dbtablename = "galaxy";
- $utablename = "usertable";
- $playertable = "players";
- $allytable = "alliances";
- $noticetable = "notices";
- $reporttable = "reports";
- $iptablename = "iptable";
- $shouttable = "shoutbox";
- $allyhistory = "alliances_history";
- $playerhistory = "players_history";
- $old_dbname = "monnom";
- $old_dbtablename = "tabelle";
- $old_utablename = "tabelle2";
- $old_pstablename = "tabelle3";
- $old_astablename = "tabelle4";
- $old_noticetable = "tabelle5";
- $old_reporttable = "tabelle6";
- $old_iptablename = "tabelle7";
- $old_shouttable = "tabelle8";
- $old_allyhistory = "tabelle9";
- if (isset($_SESSION['s_userid']) && is_numeric($_SESSION['s_userid'])) {
- $query = "UPDATE $utablename SET last_action=now() WHERE id='".$_SESSION['s_userid']."'";
- mysql_connect($dbhost,$dbusername,$dbpassword);
- mysql_select_db($dbname);
- mysql_query($query);
- mysql_close();
- }
- ?>
|
Dans le fichier 1, la commande !empty($config_content) me retourne true et j'ai du mal à comprendre pourquoi car le fichier config ne contient aucune erreur.. Merci de bien vouloir m'aider
++