Re: Writing to a file
| From: | Stuart | Date: | Fri, 03 Jul 2009 10:19:35 +0000 |
| Subject: | Re: Writing to a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294854@lists.php.net to get a copy of this message | ||
2009/7/3 Jason Carson <jason@jasoncarson.ca>:
> Hello everybody,
>
> How would I go about writing stuff to a file but in between the <?php ?>
> tags?
>
> Example, say I have config.php as follows...
>
> <?php
>
> $hostname = "localhost";
> $database = "database";
> $username = "username";
> $password = "password";
>
> ?>
>
> How would I go about adding stuff at the end of the file, but before the
> ?> tag?
Remove the ?> tag - it's not required if it's the last thing in the file.
-Stuart
--
http://stut.net/