hello j arrive pas à mettre en ligne mon site.
j ai transféré tous le contenu du dossier www de movamp avec la même arborrescence.
voici mon problème.
Parse error: syntax error, unexpected T_STRING in /homepages/46/d369994245/htdocs/Connections/acroup.php on line 9
voici le fichier acroup.php qui est dans le dossier Connections
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_acroup = "localhost:/tmp/mysql5.sock";
$database_acroup = "dbxxxxxxxxx";
$username_acroup = "dboxxxxxxx";
$password_acroup = "*******";
$link = mysql connect("$hostname_acroup", "$username_acroup", "$password_acroup", "$database_acroup");
if (!$link) {
die('pas de connexion possible: ' . mysql_error());
}
echo 'Connexion réussie';
mysql_close($link);
?>
Ca marchait bien en local avec
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_acroup = "localhost";
$database_acroup = "acro-up";
$username_acroup = "root";
$password_acroup = "";
$acroup = mysql_pconnect($hostname_acroup, $username_acroup, $password_acroup) or trigger_error(mysql_error(),E_USER_ERROR);
?>
Voici le code de mon fichier index.php
<?php include($_SERVER['DOCUMENT_ROOT'].'/Connections/acroup.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_acroup, $acroup);
$query_t_accu = "SELECT * FROM texte_accueil";
$t_accu = mysql_query($query_t_accu, $acroup) or die(mysql_error());
$row_t_accu = mysql_fetch_assoc($t_accu);
$totalRows_t_accu = mysql_num_rows($t_accu);
mysql_select_db($database_acroup, $acroup);
$query_t_actu = "SELECT * FROM texte_actu";
$t_actu = mysql_query($query_t_actu, $acroup) or die(mysql_error());
$row_t_actu = mysql_fetch_assoc($t_actu);
$totalRows_t_actu = mysql_num_rows($t_actu);
?>
merci de votr réponse