RE: [PHP] Writing to a text file from PHP
| From: | Brian Paulson | Date: | Thu, 24 Aug 2000 13:31:46 +0000 |
| Subject: | RE: [PHP] Writing to a text file from PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13410@lists.php.net to get a copy of this message | ||
>
><? $CreateObject["Scripting.FileSystemObject"]
>$filesys $OpenTextFile["D:\website\requests.txt",8,0];
> $myrequestfile.$WriteLine[$Name];
> $myrequestfile.$WriteLine[$Grade];
> $myrequestfile.$WriteLine[$SchoolName];
> $myrequestfile.$WriteLine[$Email];
> $myrequestfile.$WriteLine[$MyRequest];
> $myrequestfile.$WriteLine[$Comments];
> $myrequestfile.$WriteBlankLines[1];
> $myrequestfile.$Close;
>?>
Try something like this.
$filesys = fopen("D:\website\requests.txt", "w");
fputs($filesys,
"$Name\n$grade\n$SchoolName\n$Email\n$MyRequest\n$Comments\n\n");
Also maybe provide the line number you are getting the parse error.
hope this helps
Thank you
Brian Paulson
Sr. Web Developer
1-800-279-6397 X207
bpaulson@chieftain.com
*************************