Is this even possible?
I have read php.net and fwrite seems to suggest this is possible, but nearly every clue seems to end up in writing a variable to a specified file rather than actually creating a file in a specified directory.
Here is waht I tried.
Code: Select all
<?
$testdir = "./test1/";
$test = fopen($testdir,'a+');
$fp = fopen('news.dat','a+');
if (!$fp) {
echo "Sorry could'n open file!<br>";
} else {
if($HTTP_POST_VARS['submit'])
$testdir = "./test1/";
$test = fopen($testdir,'a+');
$fp = fopen('news.dat','a+');
$line .= "|" . $HTTP_POST_VARS['news'];
$line .= "\r\n";
fwrite($test, $fp, $line);
}
?>It is all bobbins!