...
Code Block |
---|
<?php $json = '{"a":1,"b":2,"c":3,"d":4,"e":5}'; file_put_contents( "foo.json", $json); ?> |
If you want to read the file, you can also use file_get_contents( $filename).
...
Code Block |
---|
<?php $json = '{"a":1,"b":2,"c":3,"d":4,"e":5}'; file_put_contents( "foo.json", $json); ?> |
If you want to read the file, you can also use file_get_contents( $filename).