我正在使用表单传输在线游戏的数据。但很奇怪,有时 post 对象是空的???表单由 javascript 提交并设置值。
每点击 3-5 次后,传输的表单在“post”对象中为空。我在自定义 joomla 组件的 MVC 中使用此代码。
<form method="post" action="/index.php?option=com_findme&view=pair&Itemid=40& amp;lang=de" id="pair" name="pair">
<div class="ImagesSecondRow">
<div class="ImagePaneSmall">
<input type="image" onclick="mysubmit('clickeditem','1382378814')" value="" src="http://www.dualda.com/media/com_findme/userimages/2356/thumbs/2356.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/2356/thumbs/2356.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages">
</div>
<div class="ImagesSecondRow">
<div class="ImagePaneSmall">
<input type="image" onclick="mysubmit('clickeditem','1382377841')" value="" src="http://www.dualda.com/media/com_findme/userimages/1383/thumbs/1383.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/1383/thumbs/1383.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages">
</div>
<div class="ImagesSecondRow">
<input type="image" onclick="mysubmit('clickeditem','1382378691')" value="" src="http://www.dualda.com/media/com_findme/userimages/2233/thumbs/2233.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/2233/thumbs/2233.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages"></div>
<div class="ImagesSecondRow">
<div class="ImagePaneSmall">
<input type="image" onclick="mysubmit('clickeditem','1382378778')" value="" src="http://www.dualda.com/media/com_findme/userimages/2320/thumbs/2320.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/2320/thumbs/2320.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages"> </div>
</div>
<div class="ImagesSecondRow"><div class="ImagePaneSmall"><input type="image" onclick="mysubmit('clickeditem','1382379029')" value="" src="http://www.dualda.com/media/com_findme/userimages/2571/thumbs/CU7WyX4Z.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/2571/thumbs/CU7WyX4Z.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages"></div>
<input id="clickeditem" type="hidden" value="" name="clickeditem">
<input type="hidden" value="1394821467" name="timekey">
<input type="hidden" value="0" name="timeout">
<input type="hidden" value="0.516067" name="pageloadtime">
<input type="hidden" value="com_findme" name="option">
<input type="hidden" value="pair" name="view">
</form>
<script type="text/javascript">
function overUserimage(userimg){
if (document.images)
document.images["emptyuser"].src = userimg
}
function outUserimage(){
if (document.images)
document.images["emptyuser"].src = "images/findme/empty_user.png"
}
function mysubmit(elementname,value)
{
//�ndern des formular elements
document.getElementById(elementname).value = value;
//alert(elementname + ': ' + document.getElementById(elementname).value);
document.pair.submit();
}
</script>
传输后,我使用 JRequest::getVar 检查变量。但有时它们是正确的,有时却是空的
这是硬件限制。
我也遇到同样的问题这里
如果您检查错误日志,您应该会看到
PHP Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0
PHP Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0
有关该错误的更多信息可以在此处
找到抱歉这个答案来晚了十年。我在尝试自己解决问题时发现了这篇文章。