Bonjour à tous,
je ne réussis pas à inclure mes fichier au niveau du serveur qui héberge mon site php/mysql. En local(sur mon poste et même en réseau local) tout marche; mais une fois hébergé, rien ne vas plus. Mon code php ne fonctionne plus. Le principe est que le fichier index.php appelle les autres(path.php ; header.php ; footer.php ; menu_gauche.php ; menu_droite.php,connection.php). voici les codes.
connection.php :
path.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 <?php $con_serveur = mysql_connect("localhost", "root", ""); $db = mysql_select_db("testa",$con_serveur); ?>
header.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part <?php $path="testa/"; ?>
menu_gauche.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <link href="../css/style.css" rel="stylesheet" type="text/css"> </head> <body> <table cellspacing=0 cellpadding=2 width="89%" align=center> <tbody> <tr> <td align=middle><hr align="center" size="1" class="small"> <div align="center" > <span class="small">Tous droits réservés © Copyright 2007 CIM. <a href="membre_enter.php">Espace privé</a> | <a href="admin_enter.php">Administration</a> <br> <span class="small">Designed and Powered by </span></span><span class="smallbold">CGICOM</span><span class="small"><span class="small">. </span> <SPAN id=footer>Avertissement, Données personnelles<SPAN class=footer> et </SPAN>Conditions D'utilisation </SPAN> <SCRIPT language=Javascript> var footerLinks = document.getElementById('footer').getElementsByTagName('a'); for (var i=0;i<footerLinks.length;i++) { footerLinks[i].target = '_self'; } </SCRIPT> </span></span></font> </p> </div></td> </tr> <tr> <td valign=center nowrap align=middle><div align="center"><span class="style6"></span> </div></td> </tr> </tbody> </table>
menu_droite.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 <link href="../css/style.css" rel="stylesheet" type="text/css"> <link href="../css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .Style7 {color: #A5C8DD} --> </style> <TABLE class=TBL_PERMANENT_NAVIGATION_BACKGROUND id=TBL_PERMANENT_NAVIGATION_BACKGROUND height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#A5C8DD border=0> <TBODY> <TR valign="top"> <TD height=26 colspan="2" class=border_black id=FirstCell><div align="center"> <p>Infos line <br> ou le <br> </p> </div></TD> </TR> <TR bgcolor="#015585" valign="top"> <TD height=19 class=smallbold id=FirstCell> </TD> <TD bgcolor="#015585" class=smallbold id=FirstCell><span class="dataWhite">ORGANISATION</span></TD> </TR> <TR valign="top"> <TD height=18 colspan="2" class=smallbold id=FirstCell><table width="98%" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td width="1%" class="data"><img src="../images/flecher.gif" width="4" height="6"></td> <td width="99%" class="data"><div align="left"><a href="presentation.php">Présentation</a></div></td> </tr> </table></TD> </TR> <TR valign="top"> <TD height=20 colspan="2" class=smallbold id=FirstCell> </TD> </TR> <TR bgcolor="#015585" valign="top"> <TD height=20 class=smallbold id=FirstCell> </TD> <TD bgcolor="#015585" class=smallbold id=FirstCell><span class="dataWhite">ACTUALITE</span></TD> </TR> <TR valign="top"> <TD height=20 colspan="2" class=PermTD id=FirstCell><table width="98%" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td class="data"><img src="../images/flecher.gif" width="4" height="6"></td> <td class="data"><div align="left"><a href="revue_presse.php">La revue de presse</a></div></td> </tr> </table></TD> </TR> <td height="19"> </TBODY> </TABLE>
index.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80 <link href="../css/style.css" rel="stylesheet" type="text/css"> <link href="../css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <?php $sqlrubrique =" select * from rubrique where idrubrique > 0 AND statut=1 "; //$sqltheme = $sqltheme." order by titretheme "; //echo $sql;exit; $rstrubrique=mysql_query($sqlrubrique); $nb_lignes = mysql_num_rows($rstrubrique); if ($nb_lignes>0) { $i=0; While($rowrubrique=mysql_fetch_object($rstrubrique)) { $i++; ?> <tr> <td width="100%" colspan="4"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"> <tr> <td width="100%" bgcolor="#A5C8DD"><div align="left"><a href="<?php if ($rowrubrique->idrubrique==2)echo "infos_pratiques.php"; if ($rowrubrique->idrubrique==4)echo "documentation.php";?>"><img src="../images/rubriques/<?php echo $rowrubrique->image; ?>" alt="" border="0"></a> </div></td> </tr> <tr> <td bgcolor="#015585"><span class="smallTitlewitebold"><?php echo $rowrubrique->titre ?></span></td> </tr> </table></td> </tr> <tr> <td colspan="4"><table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#015585"> <?php $sql =" select * from article where idarticle > 0 AND statut =1"; //if($_REQUEST['txt_recherche']){$sql = $sql." And nomprenomabonne like '%".$_REQUEST['txt_recherche']."%'";} $sql = $sql." And idrubrique=".$rowrubrique->idrubrique; $sql = $sql." order by priorite "; $sql = $sql." LIMIT 0,2 ;"; //echo $sql;exit; $rst1=mysql_query($sql); $nb_lignes = mysql_num_rows($rst1); if ($nb_lignes>0) { $j=0; While($row=mysql_fetch_object($rst1)) { $j++; ?> <tr> <td valign="top"><div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><span class="smallbold"><?php echo $row->titre;?></span><br> <span class="small"> <?php echo $row->resume;?><br> </span></td> </tr> <tr> <td><div align="right"><span class="data"><a href="article_details.php?op=0<?php echo '&id='. $row->idarticle;?>" >Lire >></a></span></div></td> </tr> </table> </div></td> <?php } ?> </tr> <?php } ?> </table></td> <?php }?> </tr> <?php } ?> </table><br> <p align="center"> </p>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82 <?php include 'connection.php'; include 'sessioncontrol_membre.php'; ?> <html> <head> <title>test[index]</title> <link href="../css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- body { background-color: #015585; } --> </style></head> <body > <table width="775" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="12"><img src="../images/bord_haut_gauche.gif" width="12" height="12"></td> <td width="756" background="../images/ligne_haut.gif"><img src="../images/tab/tab_ul.gif" width="2" height="7"></td> <td width="12"><img src="../images/bord_haut_droit.gif" width="12" height="12"></td> </tr> <tr> <td background="../images/ligne_gauche.gif"> </td> <td valign="top" bgcolor="#A5C8DD"><table width="100%" height="100" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php include "header.php"; ?></td> </tr> <tr> <td><div align="center"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="25%" valign="top" bgcolor="#A5C8DD"><?php include "menu_gauche.php";?></td> <td width="50%" valign="top" bgcolor="#F2F2F2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="25" class="smallTitlewitebold"> </td> </tr> <tr> <td height="25" bgcolor="#015585" class="bkg_rouge"><div align="center"> INFORMATIONS GENERALES </div></td> </tr> <tr> <td valign="top"><hr align="JUSTIFY" size="1" class="smallboldjaune"> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table></td> <td width="25%" valign="top" bgcolor="#A5C8DD"><?php include "menu_droite.php";?></td> </tr> </table> </div></td> </tr> </table> </td> </tr> <tr> <td> </td> </tr> <tr> <td><?php include "footer.php";?></td> </tr> </table></td> <td background="../images/ligne_droite.gif"> </td> </tr> <tr> <td><img src="../images/bord_bas_gauche.gif" width="12" height="12"></td> <td background="../images/ligne_droite.gif"><img src="../images/tab/tab_dl.gif" width="2" height="7"></td> <td><img src="../images/bord_bas_droit.gif" width="12" height="12"></td> </tr> </table> </body> </html>
Partager