dqsh30374 2019-04-29 20:27
浏览 342

如何上传然后在laravel中读取JSON文件

I am planning to upload a JSON file and then read it using laravel. I think it is possible but my code is not working

this is my code:

$json_file = $request->json_file;   
$json_file->move("uploads/json",$json_file->getClientOriginalName());
$json_data = file_get_contents(env('APP_URL', '')."/uploads/json/".$json_file->getClientOriginalName());
echo $json_data;
$json_data = json_decode($json_data);
var_dump($json_data);

when I upload the json file I always getting Maximum execution time of 60 seconds exceeded. I have no idea about it since my json file contains

{
    "prefix": "#",
    "token": "46881dfsf",
    "as_link": "http://mylink.com"
}

any idea about my case?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信会员卡接入微信支付商户号收款
    • ¥15 如何获取烟草零售终端数据
    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?