Got this from www.php.net:
(http://www.php.net/manual/en/function.file.php)
"Here is a quick snippet that will read in N number of lines of a file, then print them.
$n=10
$fp = file(/path/to/your/file);
$i=0
while($i < $n){
echo "$fp[$i]";
$i++;
}
I am using this right now to display the current progress of the seti@home client working on my server, instead of displaying the whole thing, which isn't web page friendly.
Because sometimes short really is sweet..."
or even:
"You can always directly insert a carriage return and line feed:
chr(13).chr(10)
Seems to work fine for me. Remember to use them together as some text readers wont recognise these separately. e.g. chr(13) (carriage return) in some cases will display an invalid character at the point where you wanted a new line. Adding chr(10) solves this.
I find it handy to make it a global var.
I know it's small but hopefully this helps someone who has to develop script for a few different platforms. It helps me."
Hope this helps - can't say I entirely understood it.
zing
Enter your message below
Sign in or Join us (it's free).