Hi,
That's about it, I only mentioned print_r() to aid your understanding.
Without that line in, and adjusting the output you get:
[php]
<?php
$file = fopen("/var/lib/penguin/Desktop/welcome.txt","r ")or exit("Unable to open file!");
$x = 0;
for($i = 0 ; $i != feof($file) ; $i++)
{
$data = fgets($file,$x) ;
$str = explode(':', $data);
for($j = 0; $j < count($str); $j++)
{
echo $str[$j] . "<br />";
}
$x=$x+1024;
}
$lcount=$i;
?
[/php]
This should, I beleive, output the contents of the file to screen.
Now, run it and see what you get. This should enable you to see what you still need to do.
Cheers
nathj
That's about it, I only mentioned print_r() to aid your understanding.
Without that line in, and adjusting the output you get:
[php]
<?php
$file = fopen("/var/lib/penguin/Desktop/welcome.txt","r ")or exit("Unable to open file!");
$x = 0;
for($i = 0 ; $i != feof($file) ; $i++)
{
$data = fgets($file,$x) ;
$str = explode(':', $data);
for($j = 0; $j < count($str); $j++)
{
echo $str[$j] . "<br />";
}
$x=$x+1024;
}
$lcount=$i;
?
[/php]
This should, I beleive, output the contents of the file to screen.
Now, run it and see what you get. This should enable you to see what you still need to do.
Cheers
nathj
Comment