The script I am attempting to use is a daily quote display script. It doesn't use mysql; it uses a simple text file list instead, which I like because it is easy to upload new lists of quotes for it to display. It uses a cron job to execute the main php script which takes one line (selected at random) from the quotes list file (quotesData.txt) and writes it into another text file (quoteToday.txt). A small script on my index.php is then supposed to display the content of the quoteToday.txt when someone goes to the URL. However the simple piece of scrip in my index.php file is not working. It worked ONCE, when I first installed the scripts, but never since. Here is my actual index.php content:
--------------------------
Code: Select all
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<title></title>
</head>
<body>
<p></p>
<p>"; ?></p>
<!--?php
// display quote of the day
$file = "quoteToday.txt";
$fh = fopen($file, "r");
$string = fread($fh, filesize($file));
fclose($fh);
echo "<p-->
<p>$string</p>
<p></p>
</body>
</html>I am obviously missing something, but what? I have to confess I am not familiar with PHP as I have only dabbled in PERL in the past. I set the permission of quoteToday.txt to 646. the script, for test purposes, is installed at: http://www.aalife.com/index.php
I can confirm that PHP is installed on my host's server (/usr/bin/php)<-Should this be stated in the above script? The script was found here: http://www.blazonry.com/php/quoteoftheday.php
However, the developer is long gone!
Thank you for your help.
Ally