pour la dernier ligne je sais mais j'ai jamais réussi a trouver comment faire
car je sais pas ou je doit la supprimer ( sur quel page de code)
pour la dernier ligne je sais mais j'ai jamais réussi a trouver comment faire
car je sais pas ou je doit la supprimer ( sur quel page de code)
Code php : 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 function get_array_from_file( $fileURL ) { $lignes = array(); $array = array(); $sep = '|'; // séparateur $handle = @fopen($fileURL, "r" ); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); $lignes[] = $buffer; } fclose($handle); } // on sépare les composants de chaque ligne foreach( $lignes as $ligne) { if( !empty(trim($ligne)) ){ // on ignore les lignes vides $array[] = array_map( 'trim', explode( $sep, $ligne ) ); // (trim) on supprime aussi les espaces et sauts de ligne inutiles } } return $array; }
ça marche un peu mieux mais veux toujours pas ce con :'(
il refuse tjr d'afficher les info :/
Et les lignes 66 / 77 sont... ?
mes echo :/
ligne 66
Code : Sélectionner tout - Visualiser dans une fenêtre à part <?php echo $array_produits[1]; ?>
ligne 77
Code : Sélectionner tout - Visualiser dans une fenêtre à part <?php echo $array_produits[1]; ?>
je remet mon code total
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 <?php if(session_id()=='') { session_start(); } // TOUJOURS EN HAUT DE SCRIPT header('Content-type:text/html; charset=UTF-8'); // encodage UTF-8 // -------------------------------------- // protection page admin // -------------------------------------- // si session vide = PAS connecté if( empty($_SESSION['admin']['login'])) { // on redirige header('location:../elements_inchangeables/connexion_admin/connexion_admin.php'); exit; } include('txt_array.php'); //<!------------------------------------------------------------------> //<!-- debut du menu --> //<!------------------------------------------------------------------> include('menu_admin.php'); ?> <!------------------------------------------------------------------> <!-- fin du menu --> <!------------------------------------------------------------------> <!DOCTYPE html> <html> <head> <title>info vente</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="../../../CSS/style_base.css" /> <link rel="stylesheet" type="text/css" href="../../../CSS/style_form.css" /> </head> <body> <div id="fond"> <div id="contenu"> <!-- debut du contenu de la partie sombre --> <div class="barre_du_centre"> <p id="formulaire"> <table> <tr> <td colspan="4" class="h3"> <a> achat jeux_d_action </a> </td> </tr> <?php include('tbody.php'); ?> <tfoot> <tr> <?php $array_achats = get_array_from_file( '../../../txt/genre/achat/jeux_d_aventures.txt' ); $array_utilisateurs = get_array_from_file( '../../../txt/Fichier_user.txt' ); $array_produits = get_array_from_file( '../../../txt/genre/jeux_d_aventures.txt' ); foreach ($array_achats as $i => $achat) { foreach ($array_produits as $j => $produit) { if ($achat[0] === $produit[0] ) { ?> <td> <img src="<?php echo $array_produits[3]; ?>" alt="" /> </td> <td style="color:white;"> <?php echo $array_produits[1]; ?> </td> <?php } } foreach ($array_utilisateurs as $k => $utilisateur) { if ($achat[1]=== $utilisateur[0] ) { ?> <td style="color:white;"> <?php echo $array_produits[1]; ?> </td> <?php } } } ?> </tfoot> </table> </p> </div> </div> <!------------------------------------------------------------------------------------------------------------------------------------> <!-- fin du contenu de la partie sombre --> <!------------------------------------------------------------------------------------------------------------------------------------> </div> </body> </html> <!------------------------------------------------------------------------------------------------------------------------------------> <!-- debut du footer --> <!------------------------------------------------------------------------------------------------------------------------------------> <?php include('footer_admin.php'); //<!------------------------------------------------------------------------------------------------------------------------------------> //<!-- fin du footer --> //<!------------------------------------------------------------------------------------------------------------------------------------> ?>
et j'avais pas vu l'erreur se prolonge latéralement
Notice: Array to string conversion in C:\xampp\htdocs\projet-web-dynamique-soulier-joris\PHP\site_connexion_admin\info_achat\achat_genre.php on line 66
Array
Notice: Array to string conversion in C:\xampp\htdocs\projet-web-dynamique-soulier-joris\PHP\site_connexion_admin\info_achat\achat_genre.php on line 77
Array
Notice: Array to string conversion in C:\xampp\htdocs\projet-web-dynamique-soulier-joris\PHP\site_connexion_admin\info_achat\achat_genre.php on line 66
Array
Notice: Array to string conversion in C:\xampp\htdocs\projet-web-dynamique-soulier-joris\PHP\site_connexion_admin\info_achat\achat_genre.php on line 77
Array
Notice: Array to string conversion in C:\xampp\htdocs\projet-web-dynamique-soulier-joris\PHP\site_connexion_admin\info_achat\achat_genre.php on line 66
Array
Notice: Array to string conversion in C:\xampp\htdocs\projet-web-dynamique-soulier-joris\PHP\site_connexion_admin\info_achat\achat_genre.php on line 77
Array
Notice: Array to string conversion in C:\xampp\htdocs\projet-web-dynamique-soulier-joris\PHP\site_connexion_admin\info_achat\achat_genre.php on line 66
Array
Notice: Array to string conversion in C:\xampp\htdocs\projet-web-dynamique-soulier-joris\PHP\site_connexion_admin\info_achat\achat_genre.php on line 77
Array
echo $produit[1];
Relis MON code (message #14)
=.= suis un abrutie .......
merci cela marche nickel chrome
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager