Welcome to DevelNet, a code gallery for creating, saving and sharing all kinds of code snippets.

PHP — Save text in file

Posted On: Wednesday, January 14, 2015 at 7:33 PM

Save text in file with php

$save_text = "text data text data";

// create filename.txt file
$fp = fopen("filename.txt", "w");

// Write the text stired in $save_text variable
fwrite($fp, $save_text);

// Close the file


Snip Comments

says Thursday, October 26, 2017 at 10:42 AM

To Get More Visit our website:-