forms - PHP create html pages with images for download without saving on server -



forms - PHP create html pages with images for download without saving on server -

i'd know if possible generate downloadable html page users input , upload without saving on server.the html form allow users download website (with images) submit button.

i figured putting html, css, , javascript html file , echo code below, trick. when gets images, not sure how handle them without having create zip folder on server contain images , html page.

<?php $htmlcode1 = "<html> \n <body>"; $htmlcode2 = "</body> \n <html>"; $htmlcontent = ""; $postedname = $_post["tofile"]; $filecontent = $htmlcode1.$_post["tofile"].$htmlcode2; header("content-type: text/html" ); header("content-disposition: attachment; filename=".$postedname.".html"); echo $filecontent; ?>

php forms file-upload download

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -