Login | Register | FAQ
Anonymous

new page

+ Post a reply

3 posts Page 1 of 1


new page

by lacroixz » Sat Dec 04, 2010 10:55 am

Hello guys.

Currently I've got a system that I can put in text in a .txt file and then upload to the ftp and then include that file on a newpage, but you'll still have to put <br /> etc. in the .txt file, so i was wondering if anyone got a simple script to add text in a specific field.

Current:
Code: Select all
<?php include("header.php"); ?>
   <?php include("file.txt"); ?>
<?php include("footer.php"); ?>


But that you can fill in the text behind some little cms behind my website, and that I can include the textfile then! Don't really know how to explain but I hope u guys know what I mean :-D

Kindly Regards!
User avatar

lacroixz

  • Posts: 74
  • Joined: Wed Oct 27, 2010 9:26 pm

Re: new page

by HTML.net » Sun Dec 05, 2010 9:13 am

Try:

echo nl2br(file_get_contents('file.txt'));

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1194
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: new page

by lacroixz » Sun Dec 05, 2010 10:36 am

It's working lad! You're great! :)
User avatar

lacroixz

  • Posts: 74
  • Joined: Wed Oct 27, 2010 9:26 pm


+ Post a reply

Page 1 of 1