Dynamical text file read using PHP script

Hi
I need a help to read a text file dynamically using PHP script?

Try something, then ask for help.

PHP.net - file — Reads entire file into an array

How big a file? You can either read the entire file into a string variable for parsing or display or
read it one line at a time if it is huge. Give us a little more info? If you need to grab the entire file,
I use this line for templates. I create an HTML template for an email that looks great and fancy and
embed a few special areas in it like —FIRSTNAME— and then use str_replace() to replace that with
the name of the person I am sending it to. Makes emailing with fancy HTML very easy to handle.
To read the template, or whatever your text file might be, use:
[php]$text = file_get_contents(“templates/email1.txt”);
[/php]
Just an example…

Sponsor our Newsletter | Privacy Policy | Terms of Service