bonsoir à tous,

j'ai un souci avec mon script de PHP ; comme l'indique le titre je ne comprends pas où on doit écrire namespace ?
voici mon code

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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
 
<?php
 
namespace Templates;
 
class Temp {
 
	static public function head ($title,$css = null,$icon) {
 
		echo ("
	
<!DOCTYPE html>
<html>
    <head>
        <meta charset='utf-8' />
        <meta http-equiv='content-type' content='text/html'>
        <link rel='icon' href='" . $icon . ".ico' />
		");
		if ($css) {
			echo ("
        <link type='text/css' rel='stylesheet' href='css/styles/" . $css .  ".css'/>
			");
		} 
		echo ("
        <!--[if lt IE 9]>
        <script src='http://html5shiv.googlecode.com/svn/trunk/html5.js'></script>
        <![endif]-->
        <title>" . "Me's Art - " . $title . "</title>
    </head>
    
    <!--[if IE 6 ]><body class='ie6 old_ie'><![endif]-->
    <!--[if IE 7 ]><body class='ie7 old_ie'><![endif]-->
    <!--[if IE 8 ]><body class='ie8'><![endif]-->
    <!--[if IE 9 ]><body class='ie9'><![endif]-->
    <!--[if !IE]><!--><body><!--<![endif]-->
        <div id='bloc_page'>
    
    		");  
 
	}
 
	static public function header () {
 
		echo ("
		
            <header>
            <div id = 'date'>
          " . date('l j F Y, H:i') . "
            </div>
                <div id='titre_principal'>
				 	<figure>
                    <img src='img/me_s_art_logo__juillet_.png' alt='Logo de ME' title='Logo de ME' id='logo'/>
					</figure>
                    <h1>Bienvenue sur ME's Art!</h1>
                    <h2>Sur ce site, vous pouvez voir chacune des oeuvres réalisées par moi, Yann QUENTIN.</h2>
						<h3>Pour naviguer à l'intérieur du site, vous pouvez soit cliquer sur l'un des liens ci-dessous représentant les différentes façons de faire un dessin, puis cliquer sur l'oeuvre choisie, soit chercher le titre de l'oeuvre que vous voulez voir dans le menu 'Liste des oeuvres' plus bas.</h3>
              </div>
                
                <nav>
                    <ul>
								<li><a href='index.php?control=display.php&f=principal'>Accueil</a></li>
                        <li><a href='index.php?control=display.php&f=tous'>Tous</a></li>
                        <li><a href='index.php?control=display.php&f=crayonscire'>Crayons de cire</a></li>
                        <li><a href='index.php?control=display.php&f=crayonscouleurs'>Crayons de couleurs</a></li>
                        <li><a href='index.php?control=display.php&f=crayonsaquarelles'>Crayons de couleurs aquarellables</a></li>
                        <li><a href='index.php?control=display.php&f=crayonspapier'>Crayons à papier</a></li>
                        <li><a href='index.php?control=display.php&f=crayonsfusains'>Crayons fusains</a></li>
                        <li><a href='index.php?control=display.php&f=crayonsgraphites'>Crayons graphites</a></li>
                        <li><a href='index.php?control=display.php&f=encre'>Encre</a></li>
                        <li><a href='index.php?control=display.php&f=feutres'>Feutres</a></li>
                        <li><a href='index.php?control=display.php&f=ordinateur'>Ordinateur</a></li>
                        <li><a href='index.php?control=display.php&f=pastels'>Pastels</a></li>
                        <li><a href='index.php?control=display.php&f=pastelsaquarelles'>Pastels aquarellables</a></li>
                        <li><a href='index.php?control=display.php&f=pastelshuile'>Pastels à l'huile</a></li>
                        <li><a href='index.php?control=display.php&f=peinture'>Peinture</a></li>
                        <li><a href='index.php?control=display.php&f=peintureacryllique'>Peinture acryllique</a></li>
                        <li><a href='index.php?control=display.php&f=sanguines'>Sanguines</a></li>
                    </ul>
                </nav>
                <h3>... ou encore accéder à l'une des applications suivantes : </h3>
                <nav>
                		<ul>
                			<li><a href='index.php?control=games.php&f=questionnaire_art'>QUESTIONNAIRE - HISTOIRE DE L'ART</a></li>
                 			<li><a href='index.php?control=games.php&f=mario_mouvant'>MARIO MOUVANT</a></li>
                 			<li><a href='index.php?control=games.php&f=des'>DESSINEZ VOUS-MÊMES</a></li>
<!--                  			<li><a href='index.php?control=functions.php&f=chronometre'>CHRONOMETRE</a></li>
 -->        			     </ul>
               </nav>
           </header>
		
		");
	}
 
	static public function aside () {
 
	}
 
	static public function footer () {
 
	echo ("
	
       <footer>
    			<a href = 'mailto:site.super25@gmail.com'>Me contacter</a>
				<br>
    			<a href = 'index.php?control=display.php&f=cv'>Voir mon CV</a>
       			<br>
       		<a href='https://www.linkedin.com/reg/join-pprofile?_ed=0_fvquXmM-AmkU8C1SEfHrH2DBtnIiOJxUrOjmtmwtOdQHofbVm2Y-mf9zhkbvzZaN1W6V2F_cw7HM79IOdXBxYtasVhtrEcaIk34JK9_-Eob&trk=ndir_viewmore' target='_blank' id='linkedin'>Retrouvez-moi sur Linkedin ! <img src='img/logo-linkedin.png' alt=''></a>
       		      <br>
       		<i>Dernière mise à jour : 30 / 05 / 2015</i>
       		      <br>
       		<b>Nombre de visiteurs : " . $_SESSION ['NB_V'] . "</b>
       </footer>
	
	");	
 
	}
 
	static public function script ($js) {
 
	}
 
}
 
?>
j'ai testé en mettant le namespace avant l'ouverture de la balise PHP et il a bien fonctionné sauf qu'il m'a écrit cette ligne en haut de la page .
quand je le mets juste après la balise PHP comme montré dans le code ci-dessus, il me donne l'erreur suivante :
Fatal error: Namespace declaration statement has to be the very first statement in the script in /var/www/html/siteweb/me_s_art/v5/templates/Templates.php on line 4
merci de vos réponses