how can a php page be updated using a .txt file? does anybody know of any tutorials? this would be really helpful for me.
thanks,
Solidgold
how can a php page be updated using a .txt file? does anybody know of any tutorials? this would be really helpful for me.
thanks,
Solidgold
just use the following where you want the text file to be output.
Thus all you have to do is change the text files content instead of editing the webpagePHP Code:
<?php include('somefile.txt') ?>
Regards Phil,
WHAT?! thats insanely easily!! thanks a lot!
No problems m8
Regards Phil,
But you might wanna be weary about that. If you accidentally or for whatever reason use the <? ?> tags in the text file, or you want to show the file "as-is" (without converting tags into HTML tags), you'll want to use file_get_contents().
Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.