Possible to write directly to file with WordPress? -
i'd wordpress write directly file. know can php, wordpress deals directly database, , doesn't static publishing default.
i know there many caching plugins available, may come down cache plugin recommendation.
here's deal: i'm trying use wordpress generate xml files need project. so, data entry. right now, solution have template put need textarea. that's easy enough, have copy , paste text file , save it. i'd love skip step , have wordpress make files me.
can recommend plugin let me easily? it's ok if comes down caching plugin, seems might overkill. simpler exist?
get content of post , feed fput:
$myfile = "myxml.xml"; $fh = fopen($myfile, 'w') or die("there error, accessing requested file."); fwrite($fh, get_the_content()); fclose($fh);
Comments
Post a Comment