Voici mon prog permettant d'afficher un certaines partie du fichier (c'est celle que je veux modifier):
<?php
$contact_name = $_GET["edit"];
$encours = 1;
$contacts = fopen ("/usr/local/nagios/etc/contacts.cfg", "r");
while ((!feof($contacts)) && ($encours)) {
$ligne = fgets($contacts,4096);
if (ereg("contact_name.*$contact_name.*",$ligne)) {$encours=2;}
if (($ligne=="}\n") && ($encours == "2")){$encours=0;}
if ($encours ==2) {echo "$ligne<BR>";}
}
fclose ($contacts);
if ($encours) {
echo "Error, no contact with this name<BR>";
}
?>
le probleme c'est que j'arrive à l'afficher sans probleme mais pour pouvoir la modifier la j'avoues que je n'y arrives pas et je suis en galere pour mon stage :((,Y aurait 'il une ame charitable pour m'aider??Merci d'avance.