divinedesigns1 Posted August 31, 2015 Share Posted August 31, 2015 is there a way to grab all the .mp3 files i have in a folder without having to write them one by one in the script? also can i do this for the files within the folders also? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 31, 2015 Share Posted August 31, 2015 No, Javascript can not open a folder and read the files. Link to comment Share on other sites More sharing options...
divinedesigns1 Posted August 31, 2015 Author Share Posted August 31, 2015 (edited) No, Javascript can not open a folder and read the files. can i use php to pull that info into javascript? or is there another language besides php where i can open and read the files? Edited August 31, 2015 by DDs1 Link to comment Share on other sites More sharing options...
Ingolme Posted September 1, 2015 Share Posted September 1, 2015 Any server-side language will work. PHP has scandir() and opendir() to work with directories. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 1, 2015 Share Posted September 1, 2015 You can also use a DirectoryIterator:http://php.net/manual/en/directoryiterator.construct.php Link to comment Share on other sites More sharing options...
thescientist Posted September 8, 2015 Share Posted September 8, 2015 You could also run NodeJS on your server as well, if you're looking for a universal / isomorphic implementation. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now