email attachment/file create problem
-
I want to send a user a file from contents I have in a $variable
Option 1: A C: drive directory browser and a fopen-fwrite-fclose to create the file in that directory
Option 2:Creating the file in the the wordpress file space, and attaching it as an email, using headers
Option 3: Create an email with the contents of the $variable as an attachment using headersI have more or less done all this before but cant get working now, as the files arnt creating. For Option 2, I tried setting permissions to 666 or 777 but no good.
$hdl=fopen(“/home/sites/xxx/public_html/yyy/wp-content/plugins/pluginname/file.csv”);
fwrite($hdl,”12345″);
fclose($hdl);
- The topic ‘email attachment/file create problem’ is closed to new replies.