member Posted September 24, 2006 Share Posted September 24, 2006 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. Link to comment https://forums.phpfreaks.com/topic/21878-quote-of-the-day-from-txt-file/ Share on other sites More sharing options...
xyn Posted September 24, 2006 Share Posted September 24, 2006 Yes, fwrite(); fclose(); www.php.net and then...include("quote_of_the_day.txt");making sure the have chmodded it to 0777 Link to comment https://forums.phpfreaks.com/topic/21878-quote-of-the-day-from-txt-file/#findComment-97712 Share on other sites More sharing options...
member Posted September 24, 2006 Author Share Posted September 24, 2006 sorry new to php, don't have a clue, do i copy paste this code? pls include the php tags thank you. Link to comment https://forums.phpfreaks.com/topic/21878-quote-of-the-day-from-txt-file/#findComment-97718 Share on other sites More sharing options...
slanton Posted September 24, 2006 Share Posted September 24, 2006 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 Link to comment https://forums.phpfreaks.com/topic/21878-quote-of-the-day-from-txt-file/#findComment-97728 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.