Are there any length limits on PHP echo?

后端 未结 2 1814
小蘑菇
小蘑菇 2021-01-19 09:52

I have this script that fetches some data from mysql and then uses echo to output it. But, as the page have grown and gotten longer all of a sudden i have this weird behavio

相关标签:
2条回答
  • 2021-01-19 09:56

    Certainly sounds like a length limit. You could always try something like this:

    $content = str_split($row['content'], 65536);
    foreach ($content as $part) {
        echo $part;
    }
    
    0 讨论(0)
  • 2021-01-19 10:15

    Are you sure it's a PHP issue? The MySQL TEXT field has a maximum size of 65535 characters. Make sure the text is actually in your database.

    0 讨论(0)
提交回复
热议问题