So I thought I'd apeal to the general population seeing how there are a lack of tutorials/help on the subject.
Right now I have the file set as:
number|user|link|name|hits
And I can read the text file and thats all ok. Its just trying to overwrite a certain entry to update the # of hits that gives me an issue.
Code: Select all
<?php
// This is what I have for the normal text file.
$fp = fopen($filename, "r");
$file_contents = fread($fp, filesize($filename));
fclose($fp);
$line = explode("\n", $file_contents);
$i = 0;
$size = sizeof($line) - 1;
?>Thanks,
d3.