表单接受程序
<?php
set_time_limit(0);
....其他语句

解决方案 »

  1.   

    to:xuzuning(唠叨)
    //upload.php
    <form name="form1" action="upload2.php">
    <input type="file" name="userfile">
    <input type="submit" name="submit" value="上传">
    </form>//upload2.php
    <?
      echo $userfile_name;
    ?>
    提示:超时错误;
    我把set_time_limit(0);放到upload.php的form中,或者放到upload2.php的echo函数前,都不起作用啊
      

  2.   


    你改作set_time_limit(300);试试。
      

  3.   


    <?
    session_start();
    ?>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>文件上传</title>
    <style>
    textarea
    {
    overflow-y:visible;
    border:0px;
    font-size:12px;
    font-family: 宋体 Fixedsys;
    line-height:150%;
    overflow:visible;
    border-width:0px;

    width:780px;
    height:40px;
    }
    </style>
    </head>
    <textarea name='info' cols="" rows="" readonly="readonly">
    <?
    $uploaddir = 'upfiles/aa/';
    if(!file_exists($uploaddir))mkdir($uploaddir);
    chmod($uploaddir, 0755 );
    print "\n";$filesname = $_FILES["upfiles"]["name"];
    $filessize = $_FILES["upfiles"]['size'];
    $filestype = $_FILES["upfiles"]['type'];
    $filesTmpName = $_FILES["upfiles"]['tmp_name'];$filestail=strrchr($filesname,".");
    if(!ereg("zip$",$filestail))
    {
    print "filestail:$filestail \n";
    }
    $namestr = str_replace($filestail,"",$filesname);
    print "namestr:$namestr \n";
    $strs = split("-",$namestr);
    print_r($strs);print "filesname:$filesname \n";
    print "filessize:$filessize \n";
    print "filestype:$filestype \n";
    print "filesTmpName:$filesTmpName \n";if(move_uploaded_file($filesTmpName,$uploaddir.$filesname))
    {
        print "File is valid, and was successfully uploaded.  Here's some more debugging info:\n";
        print_r($_FILES);
    } else {
        print "Possible file upload attack!  Here's some debugging info:\n";
        print_r($_FILES);
    }}
    ?>
    </textarea>
      

  4.   

    用以上检查上传是否正确,
    'error' 
    值:0; 没有错误发生,文件上传成功。 
    值:1; 上传的文件超过了 php.ini 中 upload_max_filesize 选项限制的值。 
    值:2; 上传文件的大小超过了 HTML 表单中 MAX_FILE_SIZE 选项指定的值。 
    值:3; 文件只有部分被上传。 
    值:4; 没有文件被上传。 
      

  5.   

    我试了,还是不行,我看着表,当网页运行了100秒的时候,就提示:
    Fatal error: Maximum execution time of 30 seconds exceeded in d:\apache\htdocs\2.php on line 8
      

  6.   

    //upload2.php
    <?
    set_time_limit(0);
      echo $userfile_name;
    ?>
      

  7.   

    to:to:: xuzuning(唠叨)
    我照你说的方法写的,
    //upload2.php
    <?
      set_time_limit(0);
      echo $userfile_name;
    ?>问题是:set_time_limit(0)根本就没起作用,写成set_time_limit(600)也只会进行100秒左右的时候就提示错误了,它好象不存在一样?怎么办?
      

  8.   

    httd.cfg这个文件在哪啊?怎么改,麻烦你说清楚一点啦