You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
453 B

  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: yigido
  5. * Date: 6/23/18
  6. * Time: 5:19 PM
  7. */
  8. $id = $_POST["id"];
  9. $value = $_POST["value"];
  10. $content = $_POST["content"];
  11. $file_loc = "../content/" . $value . "/" . $id . ".json";
  12. $myfile = fopen($file_loc, "r") or die("Unable to open file!");
  13. $send = fread($myfile,filesize($file_loc));
  14. if(isset($_POST["content"])){
  15. $send = json_decode($send,true);
  16. $send = $send[$content];
  17. }
  18. echo $send;
  19. ?>