8791 sujets

Développement web côté serveur, CMS

salut,

J'essaie d'inclure un script php du type phpwebgallery dans un calque de mon site.

Je suis novice en php. J'ai essayé en suivant des tutoriels pour inclure des fichiers dans une page mais cela se solde par un échec systématiquement.
L'erreur la plus fréquente étant
a écrit :
Warning: Cannot modify header information - headers already sent by (output started at /var/www/free.fr/a/c/loic.paquotte/Theim/logo.htm:6) in /var/www/free.fr/a/c/loic.paquotte/Theim/index.php on line 35


J'ai cru comprendre que le header a déjà été appellé par la page logo.htm pourtant j'ai bien supprimer l'essentiel des balises htm.

Pouvez-vous m'aider s'il vous plaît ça fait des deux jours que je cherche Smiley sweatdrop

Merci
La fonction header doit être appelée avant l'envoi de tout contenu au navigateur. Par tout contenu je veux dire : pas de HTML, pas de doctype, pas de prologue XML, aucun autre caractères, rien de chez rien.
Salut merci de vos réponses,

Super_baloo8 voici les codes et liens :

page test2.php :

<?php include('logo.htm'); ?>
<div id="Layer6" style="position:absolute; left:10px; top:153px; width:676px; height:419px; z-index:6">
<?php include('index.php'); ?>
</div>


page logo.htm :

<div id="Layer2" style="position:absolute; left:9px; top:21px; width:232px; height:116px; z-index:1;">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="232" height="117">
    <param name="BGCOLOR" value="" />
    <param name="movie" value="text8.swf" />
   
    <embed src="text8.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="232" height="117" ></embed>
  </object>
</div>
<div id="Layer1" style="position:absolute; left:692px; top:504px; width:176px; height:61px; z-index:1; visibility: visible;">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="158" height="60">
    <param name="BGCOLOR" value="" />
    <param name="movie" value="text1.swf" />
    <param name="quality" value="high" />
    <embed src="text1.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="158" height="60" ></embed>
  </object>
</div>
<div id="Layer3" style="position:absolute; left:840px; top:269px; width:122px; height:34px; z-index:3">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="114" height="28">
    <param name="BGCOLOR" value="" />
    <param name="movie" value="text6.swf" />
    <param name="quality" value="high" />
    <embed src="text6.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="114" height="28" ></embed>
  </object>
</div>
<div id="Layer4" style="position:absolute; left:771px; top:416px; width:125px; height:41px; z-index:4">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="113" height="47">
    <param name="BGCOLOR" value="" />
    <param name="movie" value="text5.swf" />
    <param name="quality" value="high" />
    <embed src="text5.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="113" height="47" ></embed>
  </object>
</div>
<div id="Layer3" style="position:absolute; left:821px; top:335px; width:106px; height:42px; z-index:3">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="91" height="36">
    <param name="BGCOLOR" value="" />
    <param name="movie" value="text2.swf" />
    <param name="quality" value="high" />
    <embed src="text2.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="91" height="36" ></embed>
  </object>
</div>


page index.php (page du script de phpwebgalley)

<?php
/***************************************************************************
 *                                  index.php                              *
 *                            -------------------                          *
 *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
 *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
 *                                                                         *
 *   $Id: index.php,v 1.5.2.2 2004/02/05 23:18:00 z0rglub Exp $
 *                                                                         *
 ***************************************************************************

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation;                                         *
 *                                                                         *
 ***************************************************************************/

define( 'PREFIX_INCLUDE', '' );
include_once( './include/functions.inc.php' );
database_connection();
// retrieving configuration informations
$query = 'SELECT access';
$query.= ' FROM '.PREFIX_TABLE.'config;';
$row = mysql_fetch_array( mysql_query( $query ) );
if ( $row['access'] == 'restricted' )
{
  if ( isset( $_COOKIE['id'] ) ) $url = 'category';
  else                           $url = 'identification';
}
else                             $url = 'category';
// redirection
$url.= '.php';
header( 'Request-URI: '.$url );  
header( 'Content-Location: '.$url );  
header( 'Location: '.$url );
exit();
?>


adresse de la page : http://loic.paquotte.free.fr/Theim/test2.php
Je ne connais pas cette fonction header je laisse donc le soin au pro de te répondre, je peux juste te dire que ce sont ces ligne de code qui te donne cet avertissement :

header( 'Request-URI: '.$url );  
header( 'Content-Location: '.$url );  
header( 'Location: '.$url );


Je ne comprend pas a quoi sert cette page logo.htm. Je l'ai affiché et elle me donne le menu en flash.
La page logo.htm sert effectivement à placer ma mise en page commune à toute mes pages avec :

un logo (qui n'existe pas encore)
un menu qui est pour l'instant avec des boutons en flash
oui merci QuentinC

Seulement, a partir de là je ne sais pas comment je dois modifier le code. Les headers sont contenus dans le script php de phpwebagallery.

Je ne peux pas les enlever sinon la gallerie ne fonctionne plus.

Le problème c'est que je veux placer le script dans une un calque donc il y a forcément une balise div dans laquelle je place un include qui appelle le script de phpwebgallery