PHP json 파일 읽기

1 개요[ | ]

PHP JSON 파일 읽기
$arr = json_decode(file_get_contents('test.json'), true);

2 실행예시[ | ]

root@zetawiki:~# cat test.json
{"hello":"world"}
root@zetawiki:~# cat a.php
<?php
$arr = json_decode(file_get_contents('test.json'), true);
print_r($arr);
root@zetawiki:~# php a.php
Array
(
    [hello] => world
)

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}