Recognition

No awards yet.

Posts

4 Posts
  • Published Answer

    file_put_contents won't write data anywhere

    By way of context, this is all being done in PHP. The data in question is logged to a database in addition to being made available …
    By nycstern
  • Published Answer

    file_put_contents won't write data anywhere

    Presumably that, thank you. I ended up passing the data a different way anyway.
    By nycstern
  • Published Question

    PHP download created on the fly contains the source page's HTML

    I have a page that gives users the option of downloading some data (in JSON format, if that matters). I am making use of the PHP header command as shown below: ``` <html> <body> <?php $content = '{"employee": ...
    Accepted Answer: Hi @nycstern, It does seem like it's getting your html tags: <html> <body> If you remove them, the json file you create shouldn't have those tags in it. Having said that, you most probably will have more HTML ...
    1 By nycstern PHP
  • Published Question

    file_put_contents won't write data anywhere

    I have some php scripts that dump certain data to disk so that a user can later, optionally, download them. This worked fine on my local development machine but is not working on my DigitalOcean droplet. Boiled down, ...
    Accepted Answer: Hi @nycstern, It seems to me that you don't have enough permissions to actually create the files. Check your files' and directories' permissions and ownership. It either too restrictive permissions which you can chan...
    3 By nycstern PHP Apache