Hi,
Can anyone see anything wrong with the following code? I have a txt file called import.txt that just has data in the form of..
testdata1,testdata2,testdata3
I've only got a few fields, so its not a huge file. When I run the code, the browser just sits there spinning, then times out.
function importfile(){
@$fp = fopen("$DOCUMENT_ROOT.'/import/import.txt'", "r");
if (!$fp) {
echo "There are currently no properties.";
exit;
} while (!feof($fp)) {
$property = fgetcsv($fp, 100, ",");
}
for ($i=0; $i<$property; $i++) {
echo $property[$i]."<br>";
}
}
Anyone see anything wrong?
Cheers
Ben