Bonjour à tous,
J'ai script qui ouvre un fichier ou se trouve des tags que j'aimerais pouvoir modifier.
Mon script ouvre bien le fichier et permet la saisie d'un nouveau texte, le problème, c'est que les modifications ne sont pas prises en compte et le fichier reste tel qu'à l'origine.
Quelqu'un aurait-il une idée ?
Voici mon script :
Merci par avance de votre aide
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 <script type="text/javascript"> setVarsForm("lng=<?php echo secure($_GET['id']); ?>"); </script> <table class="ta" id="ta" border="0" cellpadding="10" cellspacing="0"> <tr id="head"> <td>Variables</td> <td>Traductions</td> </tr> <?php $edit = secure($_GET['edit']); if(@$_GET['type'] == "") { $type = "front"; $page = "frontend"; } else { $type = secure(@$_GET['type']); if($type=="front") { $page = "frontend"; } elseif($type=="back") { $page = "backend"; } elseif($type=="static") { $page = "static"; } } @$nb = $_GET['nb']; $langue = "../inc/lang/$edit/frontend.php"; $fichier = file($langue); $nb_li = count($fichier); $nb_pages = ceil($nb_li / 10); if(@$_GET['nb']=="" || @$_GET['nb']=="1") { $i = 2; $nb = 1; $max = 200; } else { $i = ($nb - 1) * 10; $max = $i + 10; } while($i <= $max && $i<$nb_li) { $lang = explode("=", $fichier[$i]); echo "<tr> <td>".$lang[0]."</td> <td> <span id='$i' class='editText'>".$lang[1]."</span> </td> </tr>"; $i++; } ?> </table>
Partager