Salutation chers amis ,
J'ai un problème c'est que je lis d'un fichier text et j'affiche sur une page PHP ,son contenue mais dans l'index je veut juste afficher , 4 lignes du contenue de mon fichier .txt voila l'image pour plus d'informations :
http://hpics.li/d4a0841
Voila mon code d'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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Home</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <?php include("en_tete.php");?> <div id="content"> <div class="column"> <!--<img src="images/title1.gif" alt="" width="183" height="17" class="title" /><br /> --> <br><br> <ul class="ul2"> <li class="dd"><?php $fichier="images/b1.txt"; $tabfich=file($fichier); for( $i = 0 ; $i < count($tabfich) ; $i++ ) { echo $tabfich[$i]."</br>"; } ?></li> </ul><br> <br><br> <div class="info border"> <img src="images/pic1.jpg" alt="" width="89" height="71" /> <p> <?php $fichier="images/bienvenue.txt"; $tabfich=file($fichier); for( $i = 0 ; $i < count($tabfich) ; $i++ ) { echo $tabfich[$i]."</br>"; } ?> <a href="#" class="moree">Suite</a> </p> </div> <div class="info"> <br><br> <ul class="ul2"> <li class="dd"><?php $fichier="images/b2.txt"; $tabfich=file($fichier); for( $i = 0 ; $i < count($tabfich) ; $i++ ) { echo $tabfich[$i]."</br>"; } ?></li> </ul><br> <br><br> <img src="images/pic2.jpg" alt="" width="89" height="71" /> <p> <?php $fichier="images/actualite.txt"; $tabfich=file($fichier); $nbr=100; if(count($tabfich)<$nbr)$nbr=count($tabfich); for( $i = 0 ; $i <count($tabfich) ; $i++ ) { echo $tabfich[$i]."</br>"; } ?> </p> <p> <a href="education_m.php" class="more">Suite</a><br /> </p> </div> </div> <div class="column2"> <br><br> <ul class="ul3"> <li class="dd"><?php $fichier="images/b3.txt"; $tabfich=file($fichier); for( $i = 0 ; $i < count($tabfich) ; $i++ ) { echo $tabfich[$i]."</br>"; } ?></li> </ul><br> <p> <?php $fichier="images/evenement.txt"; $tabfich=file($fichier); for( $i = 0 ; $i < count($tabfich) ; $i++ ) { echo $tabfich[$i]."</br>"; } ?> <a href="#" class="moreee">Suite</a> </p> <br><br><div class="subscribe"> <form method="POST" action="connexion.php"> <br><br><br><input type="text" value="Login" name="loginn" /> <input type="Password" value="Password" name="passw" class="pppp"/> <button type="submit"><img src="images/enter.gif" alt="" width="35" height="18" /></button> </form> <a href="inscription.php" >Pas encore inscrit ?</a> <a href="oublie.php" >Mot de passe oublié ?</a> </div> </div> </div> <?php include("learning.php");?> <?php include("footer.php");?> </body> </html>
Partager