Click to See Complete Forum and Search --> : PHP file creation


xaviorg
02-07-2003, 06:13 PM
using PHP, how do you create a new file (ie a .txt file) on the server? this file would consist of user input, such as a calendar information file

also, anyone know of a really good online PHP tutorial?

pyro
02-08-2003, 05:35 PM
To create a file, it should work to just write to the file the first time.

$myfile = "myfile.txt";
$fp = fopen($myfile, "w");
fwrite ($fp, "Your content goes here");
fclose ($fp);

Try looking around http://www.php.net for some great info on php.