Tazerenix Posted January 7, 2010 Share Posted January 7, 2010 Sup I'm wondering if anyone could tell me a way of (like phpbb or wordpress) detecting style/theme folders and then reading from a file inside them to get their name and such. So in /themes/ the php script would detect all the directory's inside the themes directory and then inside those directory's it will read from a file (say theme.php or something) and detect those variables There is obviously a way to do this but could someone please explain what it is? (sorry if i was unclear) Quote Link to comment Share on other sites More sharing options...
cags Posted January 7, 2010 Share Posted January 7, 2010 If you are using PHP >= 5 then you can use scandir to read the contents of a file, otherwise you can use a combination of opendir and readdir. Depending on your exact requirements you may also find DirectoryIterator useful. Quote Link to comment Share on other sites More sharing options...
Tazerenix Posted January 7, 2010 Author Share Posted January 7, 2010 hmm alright, i also got a script from a friend that looks good aswell, i'll use a combo of both so i can read a file inside the dir to check what theme it is thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.