Title: header(&#039;Content-Disposition: &#8230;
Last modified: August 20, 2016

---

# header('Content-Disposition: …

 *  [sydios](https://wordpress.org/support/users/sydios/)
 * (@sydios)
 * [15 years ago](https://wordpress.org/support/topic/headercontent-disposition/)
 * Hi,
 * i am coding a plugin and i want to send some infos as text file
    directly to 
   the user. I tryed this but i looks like headers are already send so it doesent
   work. Is there an other option?
 * My Code:
 *     ```
       header('Content-Disposition: attachment; filename=textfile.txt');
       header('Content-type: text/plain');
       echo $output;
       ```
   

The topic ‘header('Content-Disposition: …’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [sydios](https://wordpress.org/support/users/sydios/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/headercontent-disposition/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
