Jump to content

how to store html file content in database


isaac_cm

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.