javascript Request-URI Too Large 请求的 URL 长度超过了该服务器的容量限制
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5796080/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Request-URI Too Large The requested URL's length exceeds the capacity limit for this server
提问by Navruk
if i use tinymce i get
如果我使用tinymce,我会得到
Request-URI Too Large The requested URL's length exceeds the capacity limit for this server.
Request-URI Too Large 请求的 URL 长度超过了该服务器的容量限制。
my code:-
我的代码:-
<!-- TinyMCE -->
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
//mode : "textareas",
mode : "specific_textareas",
editor_selector : "myBasicEditor",
theme : "simple"
});
</script>
<!-- /TinyMCE -->
if(tinyMCE.get('txtourcmnt').getContent() !="" )
{
//var test = tinyMCE.get('txtourcmnt').getContent();
//alert(test);
var ordid = '<?php echo $ordid; ?>';
var cmnt = tinyMCE.get('txtourcmnt').getContent();
cmnt = encodeURIComponent(cmnt);
var typ = 'o';
}
if(cmnt != "")
{
var url = "display_comments.php?ordid="+ordid+"&cmnt="+cmnt+"&typ="+typ;
xmlHttp = GetXmlHttpObject(funcsubcatval);
xmlHttp.open("POST", url , true);
alert(url);
xmlHttp.send(null);
}
回答by jessegavin
It looks like you're attempting to send the contents of the editor via a querystring parameter. You should send it as a post parameter instead.
看起来您正在尝试通过查询字符串参数发送编辑器的内容。您应该将其作为 post 参数发送。