我想从我的html中的文本字段通过ajax发送XML文件到PHP文件。这是全能的PHP文件:通过POST或GET发送大量数据
<?php
$data = urldecode($_POST["xml"]);
echo $data;
?>
数据被发送到该文件为这样:
$("#btn_save").click(function() {
var data = escape($("#textfield").text());
alert(data);
$.ajax({
url: "validate.php",
method: "POST",
data: "xml=" + data,
complete: function(e) { alert(e.responseText); }
});
});
现在,只要我不发比的几行代码多,它的工作原理正如它应该。但是,当我粘贴60行XML文件时,validate.php返回
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /xml_stylist/form/validate.php
on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at dahwan.info Port 80</address>
</body></html>
我在做什么错了?
感谢
什么是大量的数据?大多数服务器都有可接受的最大允许数据输入。 – 2010-09-15 14:05:52
*总是*在使用Google搜索之前检查您的Apache'error_log',甚至在此发布问题。你的error_log说什么? – Lekensteyn 2010-09-15 14:25:08