php - 发布用户输入文本时出现未知错误
问题描述
我正在尝试用 PHP 编写一个网页来处理用户上传的一行文本或一个 .txt 文件,但相应的维度$_POST
永远不会正确更新。请看下面的截图。.
我不认识这个错误,并猜测它可能与最大输入大小有关。由于我所有的输入选项卡都在相同的 .txt 下form
,并且上传的 .txt 文件总是可以正确处理,我不知道为什么用户发短信的字符串永远不会去$_POST
. 这部分的代码是这样的:(顺便说一下,截图中涵盖的是这个 .php 文件在服务器中的路径)
<form id ..., name = name1, enctype = "multipart/form-data" action ... method = "post" nonvalidate>
<div>
<label for = 'line'> ... </label>
<input id = ... name = 'line' type = 'text' ...>
</div>
...
<div>
<label for = 'file'> ... </label>
<input id = ... name = 'file' type = 'file'>
</div>
<div>
<button id = ... name = 'submit'>Submit</button>
</div>
</form>
...
<h1>Result of Processing the input line</h1>
<?php
echo var_dump($_POST).'<br>';
...
?>
如果有人认识到这个错误,很高兴听到您的更多详细信息。这是我被阻止的主要原因,现在我不知道要调试哪个部分...
解决方案
推荐阅读
- reactjs - POST 请求正文在 IIS 服务器上导致 404
- python - 如何创建一个 listcomp 来列出非列表值,然后使用 itertools 展平所有内容?
- python - 页码无序时如何抓取多个页面
- c++ - 如何使用线性搜索算法猜测用户字母
- powerbi - 如何创建过滤 2 个表的度量
- pandas - 时间数据与格式 '%yyyy-%mm-%dd 不匹配
- python - Python - Selenium:尝试循环 - if 和 elif 不起作用
- python - 如何在指定类的参数时引用类蓝图作为函数中的参数?
- android - 使用 recyclerview 搜索不起作用 - Android
- sql - 如何使用计算列计算百分比