Bonjour à tous, je ne connais pas trop le php et j'ai voulu faire un petit script qui aide à automatisé l'affichage d'une "BDD". Quand je vais sur la page web, j'obtiens l'erreur : "La page One-World.eu ne fonctionne pas"
Voici le code :
Et le site où se trouve l'erreur : one-world.eu/minecraft
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 abstract class Item { const Top = 0; const Bottom = 1; } function getList() { $modlist = array(); $handle = fopen('modlist.ods', 'r'); if ($handle) { $i = 0 while (!feof($handle)) { $buffer = fgets($handle); $modlist[i] = explode(';', $buffer) i++; } fclose($handle); } return $modlist; } function createTable($list) { $table = "" for( $i = 0, $s = count($list); i < $s; i++ ) { if( $i % 2 == 0 ) { $table += '<tr>'; $table += ' <td>' + $list[i][0] + '</td>'; $table += ' <td>' + $list[i][1] + '</td>'; $table += ' <td>' + $list[i][2] + '</td>'; $table += ' <td>' + $list[i][3] + '</td>'; $table += '</tr>'; } else { $table += '<tr class="alt">'; $table += ' <td>' + $list[i][0] + '</td>'; $table += ' <td>' + $list[i][1] + '</td>'; $table += ' <td>' + $list[i][2] + '</td>'; $table += ' <td>' + $list[i][3] + '</td>'; $table += '</tr>'; } } return $table; }
Merci de votre aide ^^
Partager