I have a list of names in a text file seperated by a line break (I could also make them seperated by commas). I am trying to take that list and make a folder for each of the names on that list. I'm not too familiar with more advanced php scripts, and I came up with this, which doesn't work:
$handle = fopen("names.txt", "r");
$text = fread($handle, filesize("names.txt"));
fclose($handle);
// explode into array
$thenames = explode("\n",$text);
for($i=0;$i<284;$i++)
{
echo "$thenames[$i]<br>";
mkdir("$thenames[$i]", 0700);
}
I made the echo just to make sure it is outputting correctly, and it does generate a list of all the names, but the mkdir() does not work (no directories are made).
Any ideas?