azukah Posted July 14, 2010 Share Posted July 14, 2010 does anybody know a way to use PHP to search a database inside specific folders and subfolders. i'm doing a knowledgebase type site and it will let users choose categories & subcategories. once those are chosen, i want to let them search with keywords inside the categories or subs (taht are actually the same as the folders and thier subs) ...?? any ideas??? Quote Link to comment Share on other sites More sharing options...
khr2003 Posted July 14, 2010 Share Posted July 14, 2010 That will depend on the types of files that you have. PHP has native support for files with txt or html extensions. If your files are stored in this way you can use the files functions that php has to read files such as file(), file_get_contnets(), fread() then you can search the text using strstr(), stristr(), strpos(). You can also use regular expression to search the text if you want to add an extra layer of complexity to the results. Quote Link to comment Share on other sites More sharing options...
trq Posted July 14, 2010 Share Posted July 14, 2010 does anybody know a way to use PHP to search a database inside specific folders and subfolders. It would be much simpler to use an actual database. 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.