그래서 어디에서나 검색 중이므로 문제를 해결할 수 없습니다. smif와 wordpress 같은 다른 위치에서 사용했던 PHP 클래스를 codeignitor 라이브러리로 변환하려고합니다. 현재 나의 유일한 딸꾹질은 데이터를 다시 데이터베이스로 보내는 것입니다. 문제의 원인은 반환 된 데이터의 양이 php.ini 파일이 설정된 압축 된 크기를 초과하므로 나중에 다른 사람을 위해 마이그레이션하거나 배포해야하는 경우 나중에 문제가 발생하므로 ini 파일을 변경하고 싶지 않습니다. 용도. 그래서 내가 필요로하는 것은 CodeIgnitor와 같습니다.mysql의 최대 패킷 크기를 초과하지 않도록 send_long_data()에 해당하는 CodeIgnitor
// Send XML data in 8196 block chunks
$start=0;
// The XML data may be large in size, so we need to
// send the data in chunks to the MySQL driver to not
// exceed the max packet size for MySQL.
while ($start < strlen($xml))
{
$end = $start + 8192;
if ($end > strlen($xml)) $end = strlen($xml);
$statement->send_long_data(3,substr($xml,$start,$end-$start));
$start = $end;
}
$start=0;
while ($start < strlen($xml))
{
$end = $start + 8192;
if ($end > strlen($xml)) $end = strlen($xml);
$statement->send_long_data(4,substr($xml,$start,$end-$start));
$start = $end;
}
$statement->execute();
나는 send_long_data에 문제를 한정시켰다. 나는 이미 파일 내의 다른 모든 것을 수정하고 아름답게 실행됩니다. 누구든지 CodeIgnitor 내에서 최대 패킷 크기를 올바르게 처리하는 적절한 방법을 알고 있습니까?