I've got a web page where I'd like someone other than me to be able to upload a .txt file (with that week's headlines, etc) and display it on the web page. That part works - easy - but how can I format it a little better? Or is there a better way to execute what i want to do? The user has little/no computer experience. Below is code I'm using to read file in -
<?php $file="varsity.txt";
$fp=fopen($file,'r');
$content=fread($fp,filesize($file));
fclose($fp);
//Then, add a <p> to the beginning, and a </p> to the end, and use
//str_replace to replace all char(10) (new lines) with </p><p>
$content = "<p>".$content."</p>";
$content = str_replace(chr(10),"</p><p>",$content);
//Then output the variable:
echo $content ;?></div>