markjaquith / feedback

Ask @markjaquith anything!
42 stars 4 forks source link

File Creation by WP Plugin #75

Open goldy619 opened 7 years ago

goldy619 commented 7 years ago

Hi Mark, as I am new to WP Plugin Development I am developing my very first plugin and it has almost been done.

I just wanted to ask you that what is the most secure way to generate a text or HTML file in wordpress

right now i am using this code $content = "some text here"; $fp = fopen($_SERVER['DOCUMENT_ROOT'] . "/myText.txt","wb"); fwrite($fp,$content); fclose($fp);

is it ok to use this code

Thanks in advance..