WordPress.org

Ready to get started?Download WordPress

Forums

header('Content-Disposition: ... (1 post)

  1. sydios
    Member
    Posted 3 years ago #

    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;

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.