you could do something like this
$buffer = '';
$fd = fopen($filename, 'r');
while (!feof($fd)) {
$buffer .= fgets($fd, 4096);
}
fclose($fd);
a better option would probably be to make your "text"
file a "php" file and echo your value where you want
them
note: whatever you include will be parsed
On Wed, 2003-06-11 at 10:45, Matt Palermo wrote:
> I would just copy the file, but I am not sure how to copy the file and paste
> it in the same folder with a different name. Any advice you can give for
> that? Thanks.
>
> Matt
I may be missing something, but:
copy('/path/to/origname.txt', '
sday, June 11, 2003 12:27 PM
Subject: Re: [PHP] getting file contents
> On Wednesday 11 June 2003 23:54, Matt Palermo wrote:
> > I have text a file which contains php code. I am using it as a template
> > for some other pages. I want to take everything in that file and store
On Wednesday 11 June 2003 23:54, Matt Palermo wrote:
> I have text a file which contains php code. I am using it as a template
> for some other pages. I want to take everything in that file and store it
> in a string or array and then output it all to an empty file (this will
> make both files lo
> I have text a file which contains php code. I am using it as a template
> for some other pages. I want to take everything in that file and store it
> in a string or array and then output it all to an empty file (this will
> make both files look exactly the same). I am using the
> file_get_cont
I have text a file which contains php code. I am using it as a template for some
other pages. I want to take everything in that file and store it in a string or array
and then output it all to an empty file (this will make both files look exactly the
same). I am using the file_get_contents()
6 matches
Mail list logo