mostafatalebi Posted December 3, 2012 Share Posted December 3, 2012 Hello everybody I have a folder consisting of several Word Documents. I want to store their name one by one in a database. How should I approach this? Quote Link to comment https://forums.phpfreaks.com/topic/271550-storing-file-names/ Share on other sites More sharing options...
berridgeab Posted December 3, 2012 Share Posted December 3, 2012 1st you will need to scan the directory to see the files. See the directory functions here. http://php.net/manual/en/function.readdir.php Once you have all filenames into an array you can add them into your database. Quote Link to comment https://forums.phpfreaks.com/topic/271550-storing-file-names/#findComment-1397252 Share on other sites More sharing options...
requinix Posted December 3, 2012 Share Posted December 3, 2012 glob will probably be easier to use. Quote Link to comment https://forums.phpfreaks.com/topic/271550-storing-file-names/#findComment-1397260 Share on other sites More sharing options...
mostafatalebi Posted December 3, 2012 Author Share Posted December 3, 2012 Thanks alot. but I will add questions probably here. Quote Link to comment https://forums.phpfreaks.com/topic/271550-storing-file-names/#findComment-1397277 Share on other sites More sharing options...
mostafatalebi Posted December 3, 2012 Author Share Posted December 3, 2012 How Can I read the title of a word document? for instance there is a distinct pattern in the file such as: Title: whateverTitle Writer: whateverWriter Subject: wateverSubject Quote Link to comment https://forums.phpfreaks.com/topic/271550-storing-file-names/#findComment-1397315 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.