elrobbo6 Posted June 2, 2011 Share Posted June 2, 2011 I have been looking around and have not been able to find any useful information on this. I am trying to transfer files from a folder in the directory to a table in a database. Eventually they will be images but for right now I am just trying to get text files to transfer. Any help/code/ideas would be a lot of help. This is going to be triggered a button on a page by the way. Quote Link to comment https://forums.phpfreaks.com/topic/238158-transfering-from-directory-folder-to-database/ Share on other sites More sharing options...
requinix Posted June 2, 2011 Share Posted June 2, 2011 What does "transfer" mean? Do they need to be uploaded to the server still? Quote Link to comment https://forums.phpfreaks.com/topic/238158-transfering-from-directory-folder-to-database/#findComment-1223851 Share on other sites More sharing options...
elrobbo6 Posted June 2, 2011 Author Share Posted June 2, 2011 they are in a folder on the server. I just want to move them from the folder they are in into a database Quote Link to comment https://forums.phpfreaks.com/topic/238158-transfering-from-directory-folder-to-database/#findComment-1223859 Share on other sites More sharing options...
mikesta707 Posted June 2, 2011 Share Posted June 2, 2011 you can use the fread() function to read the data from a file, and store the binary data in your database (assuming your database is set up correctly). Try reading through this tutorial which details storing file data in a database with php: http://www.devarticles.com/c/a/MySQL/Blobbing-Data-With-PHP-and-MySQL/ Quote Link to comment https://forums.phpfreaks.com/topic/238158-transfering-from-directory-folder-to-database/#findComment-1223873 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.