Thanks alot djr33! I got this to work *sigh of relief. Again, thanks alot :D
Printable View
Thanks alot djr33! I got this to work *sigh of relief. Again, thanks alot :D
Tiny problem: The following won't display the contents of the .txt file:
It returns the value "Array" for some reason...Code:<?php
$fc = file("file.txt");
echo $fc;
?>
That's because it's an array of all the lines in the file. See the documentation for file(). You probably mean file_get_contents().
file_get_contents() doesn't put in escape characters :(
I have \n written in the file to make a line, and it all appears as one string. How can this be fixed?
Okay. (sorry for all the posting :)) But it's done; it is a fully-functional comments page without a MySql database.
http://mburt.mb.funpic.org/contact.php
Fire at will :)
That's not what's happening at all. Remember, you're outputting HTML. In HTML, linebreaks are treated as a space.Quote:
I have \n written in the file to make a line, and it all appears as one string. How can this be fixed?
Yeah, I forgot. Kind of a stupid mistake. I changed my mind and made the file a .htm document so html tags could be valid in my code, but I used strip_tags() to make sure the user couldn't use html.
link's broken lol
Okay... here's the new link :):
http://mburt.mb.funpic.org/guestbook.php