Re: writing to files
| From: | DL Neil | Date: | Sat, 13 Oct 2001 13:27:29 +0000 |
| Subject: | Re: writing to files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70974@lists.php.net to get a copy of this message | ||
> I am fairly new to php, but would like to write my outputs to a file here is
> what I have so far..... but it writes things like "else" and "if" to the
> filename as well.
Adam,
Are the opening and closing double-quotes correctly balanced?
=dn
> <?
> $file = samplefile;
> $fd = fopen($file, "w");
> fwrite($fd, " \n
> #<?=$site_user?> - <?=$mailbox_id?> - <?=$mailbox_name?><br>
> <?=$mailbox_main_email?>> <?=$mailbox_id?><br>
> <?
> if($alias1 == NULL)
> {
> print("#");
> }
> else
> {
> ?>
> <?=$mailbox_alias1?>@<?=$web_address?> <?=$mailbox_id?>
> <?
> }
> ?
>
> and this displays text like
>
> # blah.com - blah-mail - blahmail.com
> blah@blah.com blah-mail
>
> etc etc
>
> any help would be greatly appreciated.
>
> -Adam
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>