Re: [PHP] getting file contents

2003-06-11 Thread olinux
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

Re: [PHP] getting file contents

2003-06-11 Thread Lars Torben Wilson
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', '

Re: [PHP] getting file contents

2003-06-11 Thread Matt Palermo
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

Re: [PHP] getting file contents

2003-06-11 Thread Jason Wong
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

Re: [PHP] getting file contents

2003-06-11 Thread Alex Earl
> 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

[PHP] getting file contents

2003-06-11 Thread Matt Palermo
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()