开发者

encoding from .txt file to string using php

I'm doing this project where I receive a .txt file from a MATLAB program in a PHP server. I would like to extract the data in the .txt file and encode it to a string to be sent by t开发者_JAVA技巧he server to an android. Any ideas on how to do that?


Screw the string.

readfile()


use below code for your task.

$file = file_get_contents('test.txt', true);
$parsed_str = json_decode($file);

I think it may be helpful to you..

Thanks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜