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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Document sans titre</title>
</head>
<body>
<?php
$InpRTF = "input.rtf";
$i=1;
if (file_exists($InpRTF))
{
$fp = fopen($InpRTF,"r");
while (!feof($fp))
{
$mon_contenu_rtf .= fgets($fp, 4096);
}
fclose($fp);
}
else
{
print "Inputfile: <strong>$InpRTF</strong> ";
}
//$cpt=strlen($mon_contenu_rtf);
echo "$rtf";
$tableau_de_paragraphes = explode("\\par", $mon_contenu_rtf);
foreach ($tableau_de_paragraphes as $value)
{
$fichier_pour_un_paragraphe="fichier".$i.".rtf";
echo "nom du fichier: ";
echo "$fichier_pour un paragraphe<br>";
echo.> $fichier_pour_un_paragraphe;
copy nul fichier_pour_un_paragraphe;
if (file_exists($fichier_pour_un_paragraphe))
{
$fichier= fopen($fichier_pour_un_paragraphe,"r+");
echo "Valeur : " . $value . "<br><br><br>";
fclose(fichier_pour_un_paragraphe);
}
else echo "fichier n'existe pas";
$i++;
}
?>
</body>
</html> |
Partager