plugin-development – ¿Necesito usar WP_Filesystem al crear un archivo descargable sobre la marcha?
Pregunta: Tengo un método que crea un CSV descargable sobre la marcha cuando se hace clic en un botón: header( ‘Content-type: text/csv’ ); header( ‘Cache-Control: no-store, no-cache’ ); header( ‘Content-Disposition: attachment; filename=”email_list.csv”‘ ); $outstream = fopen( ‘php://output’, ‘w’ ); fputcsv( $outstream, $csv->header ); foreach ( $csv->rows as $row ) { fputcsv( $outstream, $row ); } …