【发布时间】:2019-07-30 16:23:57
【问题描述】:
我正在尝试从 json 文件中获取一些信息, 该页面中的代码是这样的
{"asignaciones":[{"fecha":"LUNES 29/07","horaEntrada":"18:30","horaSalida":"22:30","tienda":" BK 别墅 Urquiza"}],"fechaConsulta":"29/07/2019 17:27","legajo":"28907"}
我想拍“29/7”、“18:30”、“22:30”。 现在,我可以打印页面中的所有代码,但我只想获取这些数字,有办法使用:file_get_contents?
如果这个问题非常简单,我正在尝试学习更多 php 对不起。
我现在的代码:
$content = file_get_contents('http://proveedores.alsea.com.ar:48080/asignaciones-server/mobile/main/asignaciones/legajos/28907');
echo $content
?>
【问题讨论】:
标签: php preg-match file-get-contents