• I have a simple form to download a PDF. When the form is summited the following script run.

    `<?php
    // We’ll be outputting a PDF
    header(‘Content-type: application/pdf’);
    // It will be called downloaded.pdf
    header(‘Content-Disposition: attachment; filename=”CoPay-Saving-Card.pdf”‘);
    // The PDF source is in original.pdf
    readfile(‘https://savings-card.com/wp-content/themes/savingcard/documents/Saving-Card-v2.pdf&#8217;);
    ?>’

    But when I have the iThemes plugin active it ignore the readfile and creates a PDF with the the above name that is a 1k file.

    I’ve tried to disable elements of the plugin but I think the issue is related to all the content written to the htacess file.

    Could really use some help solving this as I would like to go back to using the plugin.

    Thank You

  • The topic ‘Writing to File’ is closed to new replies.