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. Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.