Posts: 59 Joined: Tue Mar 25 2008, 11:18PM Registered Member #3872
I would use an array in the php file instead of a txt file if possible. You could do something like
$admins = array("admin1","admin2");
if(in_array .....
etc
If you really need to use the file method try something like this.
// This gets the file and creates an array with each line...
// If you get file not found errors try using a direct link with http://yoursite.com/.../.../players/admin.txt
// Then remove the true flag
$admins = file("players/admin.txt",true);
Yes but you will need a little circuit smd 5050 to isolate the inputs. Basically 12v led lights a transistor that says if dome light switch closed (door open), then open circuit to music input and power through dome light switch. Conversely, led flexible if dome light switch is open (door closed), power through music system. It's easy and you can find schematics online for free.
anyway, plain text is easier to maintain. add/remove just goes a bit faster. ^^
OP: you definently don't want the ", true" in file_get_contents("players/admin.txt", true); file_get_contents("players/admin.txt"); is all you need.
also remember that you'll have to put your txt file in lgsl_files/players/ folder since you're using a relative path and edit lgsl_details.php wich resides inside lgsl_files for example.