$handle=opendir('database/profiles');
while (false !== ($file = readdir($handle))) {
$fp = fopen ("database/profiles/$file", "r");
$contents = fread($fp, filesize("database/profiles/$file"));
$delimeter = chr(135);
$pieces = explode("$delimeter", $contents);
echo "$pieces[0]<br>";
}
Anybody see whats wrong?
Iam trying to read all the text files in a directory, open them one by one, explode them, and echo there $pieces[0] . Plz help.