我正在使用下面的代码生成JSON,在本地WAMP服务器上正常工作。但是,当我将文件导出到WEB时,脚本仅在SELECT中生成带有几个银行的JSON,如果查询大于10个结果,则它不会生成任何内容,而本地服务器上的某些内容不会发生。使用大量行生成PHP的JSON
有没有人有这个问题?编辑PHP.ini文件或者其他的东西会是这种情况吗?
<?php
//open connection to mysql db
$connection = mysqli_connect("localhost","root","123","vendas") or die("Error " . mysqli_error($connection));
//fetch table rows from mysql db
$sql = "SELECT * FROM os WHERE id_user = 15 and data_conclusao = '2017-03-02'";
$result = mysqli_query($connection, $sql) or die("Error in Selecting " . mysqli_error($connection));
//create an array
$emparray = array();
while($row =mysqli_fetch_assoc($result))
{
$emparray[] = $row;
}
echo json_encode($emparray);
//close the db connection
mysqli_close($connection);
?>
蛰códigofuncionou apenas没有formato阙欧盟precisei,欧盟tentei鲷-LO MAIS做阙Ø埃罗。 –
[ \t { “id_equipe”: “100222”, “viatura”: “123”, “nome1”: “23456” }, \t { “id_equipe”: “1022220”, “viatura” :“123”, “nome1”:“23456” \t} ] –