bonjour
voilà j'ai un souci sur ce script (phpmylogitheque).
c'est un probleme de header .
Warning: Cannot modify header information - headers already sent by (output started at /home/informad/www/ffmc11/index.php:17) in /home./informad/www/ffmc11/download.php on line 12
j'ai fait des recherche et je trouve rien sur ca !
mon index :
<?php
require('includes/session.php');
require('includes/bdd.php');
require('includes/constante.php');
//on peut mettre un fichier variable en option
require('includes/function.php');
if( isset( $_GET['page'] ) )
{
$indexpage = $_GET['page'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
<html xmlns="
http://www.w3.org/1999/xhtml " xml:lang="fr" lang="fr">
<head>
<?php
include('includes/meta.php');
?>
<title>ffmc 11</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<?php include("includes/menu.php"); ?>
<?php
//si indexpage existe on affiche la valeur correspondante
if( isset( $indexpage ) )
{
include( $indexpage . '.php' );
}
//sinon redirection vers l'accueil
else
{
include( 'accueil.php' );
}
?>
<?php include("includes/footer.php"); ?>
</html>
le code ou est le header location :
<?php
include ('../includes/conf.inc.php');
if (!isset($id)) {echo "Pas de fichier sélectionné";}
else {
$connexion=mysql_connect("$host","$login","$pass");
$db = mysql_select_db("$base", $connexion);
$requete= mysql_query("SELECT * FROM $table_download WHERE id='$id'",$connexion);
$select=mysql_fetch_array($requete);
$file=$select['url'];
$update=mysql_query("UPDATE $table_download SET nb=nb+1,date=NOW() WHERE id='$id'",$connexion);
header('Location: $file');
exit();
}
?>
et peut-etre aussi la page des details :
<?php
include('includes/conf.inc.php');
// Requête sur la base permettant l'affichage des fiches détaillées des logiciels
include ('includes/compteurdl.php');
$mysql_link = mysql_connect($host,$login,$pass);
mysql_select_db($base, $mysql_link);$query
"select * from $table where ID '$id'";
$mysql_result = mysql_query($query, $mysql_link);
while($row = mysql_fetch_row($mysql_result)) {
$NBcat = $row[1];
$nom = $row[2];
$version = $row[3];
$langue = $row[4];
$os = $row[5];
$taille = $row[6];
$licence = $row[7];
$desc = $row[8];
$date = $row[9];
}
$query2 = "select * from $table_categories where NB='$NBcat'";
$resultat = mysql_query($query2, $mysql_link);
while($row2 = mysql_fetch_row($resultat)) {
$cat = $row2[1];
}
?>
----
,
<?php echo $nom ; ?>
,
----
,
----
,
<?php echo $desc ; ?>
,
,
----
,
----
,
----
Catégorie:
<?php echo $cat ?>
,
----
,
----
,
Informations détaillées
,
----
,
Version :
,
<?php echo $version ?>
,
----
,
Système d'exploitation :
,
<?php echo $os ?>
,
----
,
Type de licence :
,
<?php echo $licence ?>
,
----
,
Langue :
,
<?php echo $langue ?>
,
----
,
Ajouté le :
,
<?php echo $date ?>
,
----
,
Taille du fichier :
,
<?php echo $taille ?>
,
----
,
----
,
Nombre de téléchargements :
,
<?php nbdl($id); ?>
,
----
,
Date du dernier téléchargement :
,
<?php lastdl($id); ?>
,
----
,
----
,
,
,
,
,
,
[index.php?page=download&id=<?php echo $id; ?>
]
merci pour votre aide !
au fait c'est quand je clique sur le bouton télécharger que j'ai ce souci de header.
Afficher la suite