file-generation

HTML client-side portable file generation - no external resources or server calls

∥☆過路亽.° 提交于 2019-12-10 16:45:42
问题 I have the following situation: I have set up a series of Cron jobs on an internal company server to run various PHP scripts designed to check data integrity. Each PHP script queries a company database, formats the returned query data into an HTML file containing one or more <tables> , and then mails the HTML file to several client emails as an attachment. From my experience, most of the PHP scripts generate HTML files with only a few tables, however there are a few PHP scripts the create

php create file and send as attachment without actually creating the file

孤街浪徒 提交于 2019-12-05 00:06:19
问题 I know how to read a file on the server and attach it to an email in PHP, but I wanted to know if I could attach a file that is created by my script but not created on the server (kinda like a temp file). So create file in memory and attach it to email. Bonus: might need to create multiple files as well, would this be too much for the server to handle? I'm not talking GB's but like 5 files with 1000 lines each? 回答1: Yes you can do that, as long as whatever email library you're using supports

php create file and send as attachment without actually creating the file

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 16:52:25
I know how to read a file on the server and attach it to an email in PHP, but I wanted to know if I could attach a file that is created by my script but not created on the server (kinda like a temp file). So create file in memory and attach it to email. Bonus: might need to create multiple files as well, would this be too much for the server to handle? I'm not talking GB's but like 5 files with 1000 lines each? Yes you can do that, as long as whatever email library you're using supports it. If you're not using one, you should be! No, 5 files won't be too much for your server unless you bought