writing to a txt file
Posted: Fri Jun 06, 2003 11:31 pm
The code below works great to write to a txt file on a remote server. However I just installed apache 2 and the latest php4.3 and it doesn't seem to work. my register_globals is on! I can't seem to figure out why it doesn't work? any help is greatly appreciated!!
Also is it possible to save a new txt file instead of always writting or re-writting over the same one?
thanks in advance,
t-
<?
function WriteToFile($URL, $Description){
$TheFile="data.txt";
$Open=fopen($TheFile, "w+");
fwrite ($Open, "$URL\t$Description\n");
fclose ($Open);
}
?>
<html>
<title>refresh</title><body>
<?php
$CallFunction=WriteToFile
($Array["URL"], "variable=".$Array["Description"]);
?>
done
</body>
</html>
Also is it possible to save a new txt file instead of always writting or re-writting over the same one?
thanks in advance,
t-
<?
function WriteToFile($URL, $Description){
$TheFile="data.txt";
$Open=fopen($TheFile, "w+");
fwrite ($Open, "$URL\t$Description\n");
fclose ($Open);
}
?>
<html>
<title>refresh</title><body>
<?php
$CallFunction=WriteToFile
($Array["URL"], "variable=".$Array["Description"]);
?>
done
</body>
</html>