Bonjour,
quand je teste mon application (avec wamp) et quand je lance le script suivant, ça marche nickel :
Par contre, dès que je le copie ce script sur mon site internet, ça marche pas et ça me génère des Warnings comme quoi les fonctions fopen, fwrite et fclose n'ont pas réussi leur opération.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <?php $body_content="This is my content"; // Store some text to enter inside the file $file_name="C:\\Users\\Toto\\test\\test.txt"; // file name echo $file_name; $fp = fopen ($file_name, "w"); // Open the file in write mode, if file does not exist then it will be created. fwrite ($fp,$body_content); // entering data to the file fclose ($fp); // closing the file pointer //chmod($file_name,0777); // changing the file permission. ?>
Est-ce normal? Sachant que l'environnement de test est Windows Vista.
Merci d'avance !!!







Répondre avec citation
Partager