FCKEditor 在 POST 上丢失大量内容

发布于 2024-08-03 22:10:45 字数 162 浏览 2 评论 0原文

因此,我见过 FCKEditor 做的一件非常奇怪的事情:如果其中粘贴了大量文本,它会出于某种非常奇怪的原因将其丢弃并在 POST 时清空自身。我不确定要调试什么来捕获代码中的错误,或者这是否只是编辑器本身的限制。想法?应该说,如果内容量有限的话,效果还不错。例如,相当于 Word 文档的一页或两页的纯文本。

So here's a very strange thing I've seen FCKEditor do: If there's a large amount of text pasted in it, it will simply drop it and empty itself upon POST for some very odd reason. I'm not sure what to debug to catch the error in my code or if it's just a limitation of the editor itself. Thoughts? I should say that it works just fine if the amount of content is limited; plain-text equivalent to a page or two of a word document for example.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拍不死你 2024-08-10 22:10:45

我认为问题在于您如何将数据存储在数据库中而不是 FCKEditor 中 - 我已经发布了 300 多页文本,但没有收到您所描述的错误。

我会尝试回应正在发布的所有内容。将此行代码放在您要发布到的脚本的顶部。

echo '$_POST = '. htmlentities(var_export($_POST, 1)); die;

如果我是对的,那么你的问题是 MySQL 截断了你放入其中的数据。使用默认的 MySQL 错误报告很难发现这个问题。

I believe that the problem is in how you are storing the data in your DB and not in FCKEditor - I have posted over 300 pages of text without getting the error that you are describing.

I would try echoing everything that's being posted. Put this line of code at the top of the script you are posting to.

echo '$_POST = '. htmlentities(var_export($_POST, 1)); die;

If I'm right, your issue is with MySQL truncating the data that you are putting into it. This problem is hard to see with default MySQL error reporting.

套路撩心 2024-08-10 22:10:45

我不知道为什么会发生这种情况,但为了缩小问题是否是 FCKEditor 还是接收进程的问题,请尝试在发送 POST 请求之前对编辑器的内容进行警报。

否则 - POST 数据的大小是否在您的服务器上受到限制?

I don't know why it happens, but to narrow down whether it's a problem with the FCKEditor or the recipient process, try alerting with the contents of the editor right before the POST request is sent.

Otherwise - is the size of POST data limited somewhere on your server?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文