簡體   English   中英

替代file_get_contents從POST URL讀取JSON數據?

[英]alternative to file_get_contents for reading the JSON data from POST URL?

我的POST URL為“ http://domain/mycontroller/function/info.json ”,如何讀取“ info.json ”,我使用的是file_get_contents("php://input")但是還有其他選擇info.json讀取JSON數據或“ info.json ”。

如果在本地計算機上,則可以使用

 fopen 
 fclose

http://php.net/manual/bg/function.fopen.php

如果在遠程計算機上,您可以使用

 curl

http://php.net/manual/zh/book.curl.php

的速度

您可以使用打開或卷曲

加速

curl>>>fopen>file_get_contents

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM