首页 > 解决方案 > 发布用户输入文本时出现未知错误

问题描述

我正在尝试用 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>';
    ...
  ?>

如果有人认识到这个错误,很高兴听到您的更多详细信息。这是我被阻止的主要原因,现在我不知道要调试哪个部分...

标签: phphtml

解决方案


推荐阅读