isaac_cm Posted November 18, 2006 Share Posted November 18, 2006 Hi,If any one know a simple script to to store html file content in databaseI will make the user upload the html file first and I know how to do that but I need help about storing the html file contentthanks Link to comment https://forums.phpfreaks.com/topic/27681-how-to-store-html-file-content-in-database/ Share on other sites More sharing options...
Orio Posted November 18, 2006 Share Posted November 18, 2006 There's no diffrence than storing other strings in the database. Just make sure that your database fields are big enough.Orio. Link to comment https://forums.phpfreaks.com/topic/27681-how-to-store-html-file-content-in-database/#findComment-126616 Share on other sites More sharing options...
wildteen88 Posted November 18, 2006 Share Posted November 18, 2006 You'll want use the file_get_contents function or use fopen, fread and fclose functions to get the contents of the uploaded html file. Then to insert the files contents into the database. You'll want to use MEDIUMTEXT as the data type for storing the contents of the file. Once you've stored the files contents you can delete the uploaded file if you wish using unlink Link to comment https://forums.phpfreaks.com/topic/27681-how-to-store-html-file-content-in-database/#findComment-126622 Share on other sites More sharing options...
isaac_cm Posted November 18, 2006 Author Share Posted November 18, 2006 ok, I will use file_get_contents and I already set the field type to "LONGTEXT" thanks very much Link to comment https://forums.phpfreaks.com/topic/27681-how-to-store-html-file-content-in-database/#findComment-126718 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.