I have an array in my script like this
$acceptedID = array ('su', 'root');
I thought that eventually it would be hard to add more and more as this array would get really long. So I wondered if it was possible to have an external file like this
su
root
asdf
etc.
and have it read in the script as
$acceptedID = array ('su', 'root', 'asdf', 'etc.');
and have that keep changing as the external text file changes. Is there any way to do this? Also after the array is there, it has to run and if statement to see if it is in an array.
if (in_array($id, $acceptedID))
return 'YES';
else
return 'NO';
$acceptedID = file('myList.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);