Bonjour,
j'ai un formulaire :
Lorsque le fichier téléchargé dépasse la configuration de PHP (2M), les variables $_POST et $_FILES sont vides. J'ai cherché sur internet mais je ne trouve pas d'explication.
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 $result = sql_db_query($SQL_ID, $_GET['database'], "SHOW fields FROM " . addBackQuote($_GET['tablename']) . ";"); $num = sql_num_rows($result); echo "<form action='index.php?" . $SID . "action=insert_confirm&database=". urlencode($_GET['database']) . "&tablename=" . urlencode($_GET['tablename']) . "' method='post' enctype='multipart/form-data'>" ; echo " <table class='tableEdit'>\n" . " <tr class='tableHeader'>\n" . " <td>" . traduct('Field') . "</td>\n" . " <td>" . traduct('Type') . "</td>\n" . " <td>" . traduct('Function') . "</td>\n" . " <td>" . traduct('Value') . "</td>\n" . " </tr>\n" ; $tableOddLine = false ; $phpFileSizeUpload = convertUploadSize() ; for($i = 0; $i < $num; $i++) { if ($tableOddLine) { $class = "tableOddLine" ; $tableOddLine = false ; } else { $class = "tableEvenLine" ; $tableOddLine = true ; } $field = sql_fetch_array($result); $tabField[] = $field["Field"] ; $type = getTypeField($field["Type"]) ; echo " <tr class='" . $class . "'>\n" . " <td>" . "<input type='hidden' name='namefield[" . $field["Field"] . "]' />" . $field["Field"] . "</td>\n" . " <td>" . $field["Type"] . "</td>\n" . " <td>" ; listSQLFunction("function[" . $field["Field"] . "]") ; echo "</td>\n" . " <td><input type='text' name='data[" . $field["Field"] ."]' />" ; // If binary data, show hexa and file input if ($type["binary"]) { echo " <input type='checkbox' name='hexa[" . $field["Field"] . "]' value='1' />" . traduct('in hexa or') . " <input type='file' name='fileBlob[" . $field["Field"] . "]' max_file_size='" . $phpFileSizeUpload . "' />" ; } echo "</td>\n" . " </tr>\n"; } echo " </table>\n" . " <input type='submit' value='" . traduct('Insert') . "' />\n" . "</form>\n" ;
Si nom fichier est inférieure aux 2M, là ça fonctionne. Etrange non ?
Je suis en PHP 5.3.0.
Merci
Partager