OK almost understand what file_put_contents work ,
$file = __DIR__."/test.txt";
file_put_contents($file, "Hello, World!");
echo file_get_contents($file);
i also find in diferent format
<?php
// Open the text file
$f = fopen("test.txt", "w");
// Write text line
fwrite($f, "PHP is fun!");
// Close the text file
fclose($f);
// Open file for reading, and read the line
$f = fopen("test.txt", "r");
echo fgets($f);
fclose($f);
?>
witch is same function , but still the problem its same i can't connect it to my code witch alredy have or i need to do something totali differend