writing to files

From: Date: Sat, 13 Oct 2001 06:30:44 +0000
Subject: writing to files
Groups: php.general 
Request: Send a blank email to php-general+get-70961@lists.php.net to get a copy of this message
Hello, 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. <? $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

« previous php.general (#70961) next »