Answers for "php save json to file"

2

save json to file

import json

data = {}

with open('data.txt', 'w') as outfile:
    json.dump(data, outfile)
Posted by: Guest on February-27-2020
0

convert text file to json php

<?php
  header('Content-type: application/json');
  echo json_encode( explode("rn",file_get_contents('data.txt')) );
?>
Posted by: Guest on November-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language