fwrite?
Code: Select all
$output = $name."\t".$comment."\t"."\n";
$fp = fopen("d:\hshome\c239198\local54memberforum.com\info.txt", "ab");
fwrite($fp, $output);
Any ideas?
Moderator: General Moderators
Code: Select all
$output = $name."\t".$comment."\t"."\n";
$fp = fopen("d:\hshome\c239198\local54memberforum.com\info.txt", "ab");
fwrite($fp, $output);
Code: Select all
<?php
error_reporting(E_ALL);
/**
* Declaration of variables
*/
$name = 'Apple';
$comment = 'Hello, World';
/**
* Opening a file (append mode)
*/
$handle = fopen('add.txt', 'a+');
fwrite($handle, "{$name} has leaved a comment: {$comment}\t\n");
fclose($handle);
?>