I have used json_encode($response) to list the all the files in the directory. Since it has nearly 8000 records in the array of $response, when displayed in the page, it returns null.
I have research about this issue. So far, I could not find any solution.
This is my code:
$response['content'] = Files::$output;
echo json_encode($response);
Files::$output` /* this will return the list of files in the html format. */
When I try echo json_last_error_msg();, it returns:
Malformed UTF-8 characters, possibly incorrectly encoded
json_last_error_msg?