Re: variable for file name
| From: | Burhan Khalid | Date: | Wed, 09 Apr 2003 10:54:00 +0000 |
| Subject: | Re: variable for file name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143039@lists.php.net to get a copy of this message | ||
On Wed, 2003-04-09 at 04:38, Diksha Neel wrote:
[ snip ]
> $fp = fopen ("$wname.html", "w");
>
> where $wname will be holding value as 'aditya'
> so that by the fopen function, i should be
> able to open "aditya.html".
>
if ( !($fp = fopen($wname.".html", "w")) ) {
die ("Can't open ".$wname."html");
}
That should do it.
--
Burhan Khalid
phplist[at]meidomus[dot]com
Please add a reply-to: header
in your messages that points
to the mailing list address
so that all mail is properly
archived and viewed.