Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 为什么我的表单和空上传表单需要这么长时间?原因可能是什么?_Php_Html_File Upload - Fatal编程技术网

Php 为什么我的表单和空上传表单需要这么长时间?原因可能是什么?

Php 为什么我的表单和空上传表单需要这么长时间?原因可能是什么?,php,html,file-upload,Php,Html,File Upload,我有一个带有简单文件上传输入的表单,比如: <div class="contenttitle radiusbottom0"> <h2 class="finfo"><span>Uploader</span></h2> </div> <p> Chose your file: <input type="file" name="uploaded_file" /> </p>

我有一个带有简单文件上传输入的表单,比如:

<div class="contenttitle radiusbottom0">
    <h2 class="finfo"><span>Uploader</span></h2>
</div>
<p>
    Chose your file: <input type="file" name="uploaded_file" />
</p> 
    <div class="boxwhite">
    <form class="stdform" enctype="multipart/form-data" method="post" action=""> 
        <div class="two_third">       
            <p>
                <label>Header</label>
                <input type="text" name="title" id="firstname" class="longinput" value=""/>
            </p>
        </div>     
        <div class="one_third">      
            <p>
                <label>Status</label>
                <select name="status">
                    <option value="1" <?= $content[status]==1?'selected':'' ?> >Active</option>
                    <option value="0" <?= $content[status]==0?'selected':'' ?> >Pasive</option>                     
                </select> 
            </p>
        </div>
        <br clear="all" />  
            <input type='hidden' name='parent_id' value='3' /> 

        <div class="contenttitle radiusbottom0">
           <h2 class="finfo"><span>Uploader</span></h2>
        </div>
        <p>
           Chose your file: <input type="file" name="uploaded_file" />
        </p> 
        <BR />
            <input type="submit" name="submit" value="Add" class="" />
            <button class="cancel radius2">Cancel</button>
    </form>
</div>

上传器

选择您的文件:

其余的也是一种非常简单的形式。现在,当我执行(提交)这个表单时,处理它大约需要30秒。即使我没有选择上传任何文件

当我从表单中删除文件输入时,最多需要1秒的时间。我将其添加回表单,并且再次花费大量时间。操作页面并不重要。有什么问题吗

这是完整的表格:

<div class="contenttitle radiusbottom0">
    <h2 class="finfo"><span>Uploader</span></h2>
</div>
<p>
    Chose your file: <input type="file" name="uploaded_file" />
</p> 
    <div class="boxwhite">
    <form class="stdform" enctype="multipart/form-data" method="post" action=""> 
        <div class="two_third">       
            <p>
                <label>Header</label>
                <input type="text" name="title" id="firstname" class="longinput" value=""/>
            </p>
        </div>     
        <div class="one_third">      
            <p>
                <label>Status</label>
                <select name="status">
                    <option value="1" <?= $content[status]==1?'selected':'' ?> >Active</option>
                    <option value="0" <?= $content[status]==0?'selected':'' ?> >Pasive</option>                     
                </select> 
            </p>
        </div>
        <br clear="all" />  
            <input type='hidden' name='parent_id' value='3' /> 

        <div class="contenttitle radiusbottom0">
           <h2 class="finfo"><span>Uploader</span></h2>
        </div>
        <p>
           Chose your file: <input type="file" name="uploaded_file" />
        </p> 
        <BR />
            <input type="submit" name="submit" value="Add" class="" />
            <button class="cancel radius2">Cancel</button>
    </form>
</div>


标题

地位 >帕西夫


上传器 选择您的文件:


取消

(此文件位于windows服务器上)

我已将工作移到linux服务器上。现在一切正常。

完整的html表单看起来怎么样?我希望你有一个……我已经在上面添加了完整的html。嗯,表单的
操作是什么?例如,您可以删除表单中除
之外的所有内容,然后再次提交(仅用于测试)…服务器端脚本是否引发任何错误?不,没有错误@bouscher。