Jump to content

Archived

This topic is now archived and is closed to further replies.

member

Quote of the day from .txt file

Recommended Posts

Hi,

just wanted to ask u if u know the code to load a text from a .txt file which will contain some html to load it as a "quote of the day"

Thank You very much, ur help is most appreciated.

Share this post


Link to post
Share on other sites
Yes, fwrite(); fclose(); www.php.net and then...
include("quote_of_the_day.txt");
making sure the have chmodded it to 0777

Share this post


Link to post
Share on other sites
sorry new to php, don't have a clue, do i copy paste this code? pls include the php tags thank you.

Share this post


Link to post
Share on other sites
What about
[code]
<?php
$filename = "quotes.txt";
$file = file($filename);
$file=shuffle($file);
echo $file[0];
?>
[/code]
just remember to put each quote on a new line in the txt file

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.